diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index 1bb83a4..25d4dd2 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -26,7 +26,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 submodules: true @@ -53,27 +53,36 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-24.04, macOS-11 ] - python-version: [ 36, 37, 38, 39, 310, 311 ] + os: [ ubuntu-24.04, macos-14, macos-15-intel ] + python-version: [ 310, 311 ] steps: - name: "Checkout code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 submodules: true - name: "Build wheel (${{ matrix.os }}, py${{ matrix.python-version }})" - uses: pypa/cibuildwheel@v2.11.1 + uses: pypa/cibuildwheel@v2.21.3 with: config-file: cibuildwheel.toml env: CIBW_BUILD: "cp${{ matrix.python-version}}-*" + # Override deployment target to 14.0 for all macOS runners + MACOSX_DEPLOYMENT_TARGET: "14.0" + # Build only native architecture on each runner (no cross-compilation) + CIBW_ARCHS_MACOS: >- + ${{ + matrix.os == 'macos-14' && 'arm64' || + matrix.os == 'macos-15-intel' && 'x86_64' || + 'auto' + }} - name: "Upload build artifacts (${{ matrix.os }}, py${{ matrix.python-version }})" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: dist + name: dist-${{ matrix.os }}-py${{ matrix.python-version }} path: ./wheelhouse/*.whl make_sdist: @@ -83,7 +92,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 submodules: true @@ -94,9 +103,9 @@ jobs: pipx run build --sdist - name: "Upload build artifacts" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: "dist" + name: "dist-sdist" path: "dist/*.tar.gz" publish_to_pypi: @@ -113,10 +122,14 @@ jobs: steps: - name: "Download build artifacts" - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: "dist" - path: "dist" + path: "artifacts" + + - name: "Collect all artifacts into dist folder" + run: | + mkdir -p dist + find artifacts -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec cp {} dist/ \; - name: "Publish to PyPI" if: startsWith(github.ref, 'refs/tags') diff --git a/.gitignore b/.gitignore index 99073f4..2d7ac95 100644 --- a/.gitignore +++ b/.gitignore @@ -28,9 +28,8 @@ tests/FFPopSim.py tests/FFPopSim.pyc tests/_FFPopSim.so -# SWIG generated files (they are kept in the static-gsl branch) -src/python/FFPopSim.py -src/python/FFPopSim_wrap.cpp +# SWIG generated Python module (FFPopSim.py is kept in repo) +# Wrapper is now committed to ensure consistent SWIG 4.3.1 across platforms # Compiled Object files *.slo diff --git a/Makefile b/Makefile index fd34a89..86876a7 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ # Please set your Python 3 executable if you want to build the Python # bindings. If you are only interested in the C++ part of the library, # comment out the following line -PYTHON := python3 +PYTHON := micromamba run -n ffpopsim11 python # Note: please look in 'setup.py' if you are building the Python extension! # You can call distutils with 'setup.py' directly if you prefer. The @@ -73,11 +73,19 @@ OPTIMIZATION_LEVEL := O2 # Please use the following variable for additional flags to the C++ compiler, # such as include folders (e.g. -I/opt/local/include) -CXXFLAGS = -c -Wall -$(OPTIMIZATION_LEVEL) -fPIC +GSL_CFLAGS := $(shell gsl-config --cflags 2>/dev/null) +# Try to find Boost in common locations (macOS Homebrew, MacPorts, or standard Linux paths) +BOOST_INCLUDE := $(shell \ + if [ -d /opt/homebrew/opt/boost/include ]; then echo "-I/opt/homebrew/opt/boost/include"; \ + elif [ -d /usr/local/opt/boost/include ]; then echo "-I/usr/local/opt/boost/include"; \ + elif [ -d /opt/local/include/boost ]; then echo "-I/opt/local/include"; \ + fi) +CXXFLAGS = -c -Wall -$(OPTIMIZATION_LEVEL) -fPIC -std=c++11 $(GSL_CFLAGS) $(BOOST_INCLUDE) # Please use the following variable for additional flags to the linker, such # as library folders for GSL (e.g. -L/opt/local/lib) -LDFLAGS = -$(OPTIMIZATION_LEVEL) +GSL_LDFLAGS := $(shell gsl-config --libs 2>/dev/null | sed 's/-lgsl -lgslcblas//') +LDFLAGS = -$(OPTIMIZATION_LEVEL) $(GSL_LDFLAGS) # Additional options used to regenerate the SWIG files or to rebuild the docs. @@ -263,11 +271,7 @@ $(TESTSDIR)/$(TESTS_OBJECT_GENEALOGY): $(TESTSDIR)/$(TESTS_SOURCE_GENEALOGY) $(CXX) $(TESTS_CXXFLAGS) -c $(@:.o=.cpp) -o $@ run-tests: - cd "tests" && ./highd - cd "tests" && ./hivpopulation - cd "tests" && ./lowd - cd "tests" && ./recombination_lowd - cd "tests" && ./test_genealogy + cd tests && ./highd && ./hivpopulation && ./lowd && ./recombination_lowd && ./test_genealogy clean-tests: cd $(TESTSDIR); rm -rf *.o $(TESTS_LOWD) $(TESTS_HIGHD) $(TESTS_GENEALOGY) $(TESTS_LOWD_REC) $(TESTS_HIVPOP) diff --git a/cibuildwheel.toml b/cibuildwheel.toml index e7e910b..b207a11 100644 --- a/cibuildwheel.toml +++ b/cibuildwheel.toml @@ -11,46 +11,57 @@ skip = [ "pp*", ] -macos.archs = ["x86_64", "arm64"] +# Architecture is set per-runner in the workflow file to avoid cross-compilation +# GSL libraries from Homebrew require macOS 14.0 minimum +macos.environment = {MACOSX_DEPLOYMENT_TARGET = "14.0"} build-verbosity = 1 linux.before-build = [ "yum makecache fast", "yum install -y boost-devel gsl-devel >/dev/null", - "make swig", ] macos.before-build = [ "brew install boost gsl", - "make swig", -] - - -test-skip = [ - "*aarch64*", - "*arm64*", - "*ppc64*", - "*s390x*", ] linux.before-test = [ - "yum install -y parallel >/dev/null", - "pip install biopython matplotlib numpy pandas pygments scipy" + "pip install 'biopython' 'matplotlib' 'numpy<2' 'pandas' 'pygments' 'scipy'" ] +# Run examples serially (one at a time) without parallel to avoid memory issues in CI linux.test-command = [ - "cd {project} && bash ./run-examples --skip-slow" + """cd {project}/examples && for f in *.py; do + case "$f" in + benefits_of_sex.py|genealogies_with_selection.py|measuring_fixation_probabilities.py|multi_sample_adaptive.py|mutation_selection_balance_highd.py|neutral_LD_highd.py|speed_highd.py|speed_lowd.py) + echo "Skipping slow example: $f" + ;; + *) + echo "Testing $f..." + MPLBACKEND=Agg python3 "$f" || exit 1 + ;; + esac + done""" ] macos.before-test = [ - "brew install parallel >/dev/null", - "pip install biopython matplotlib numpy pandas pygments scipy" + "pip install 'biopython' 'matplotlib' 'numpy<2' 'pandas' 'pygments' 'scipy'" ] -# Tests are very slow on mac, so only do basics +# Run same tests as Linux for consistency - serially without parallel macos.test-command = [ - "cd {project} && python examples/example.py" + """cd {project}/examples && for f in *.py; do + case "$f" in + benefits_of_sex.py|genealogies_with_selection.py|measuring_fixation_probabilities.py|multi_sample_adaptive.py|mutation_selection_balance_highd.py|neutral_LD_highd.py|speed_highd.py|speed_lowd.py) + echo "Skipping slow example: $f" + ;; + *) + echo "Testing $f..." + MPLBACKEND=Agg python3 "$f" || exit 1 + ;; + esac + done""" ] diff --git a/examples/genealogies_with_selection.py b/examples/genealogies_with_selection.py index 4b8c0cc..ecfcb50 100644 --- a/examples/genealogies_with_selection.py +++ b/examples/genealogies_with_selection.py @@ -38,8 +38,8 @@ #set the effect sizes of the mutations that are injected (the same at each site in this case) pop.set_fitness_additive(np.ones(L)*s) -#track the genealogy at a central locus L/2 (which one doesn't matter in the asexual case) -pop.track_locus_genealogy([L/2]) +#track the genealogy at a central locus L//2 (which one doesn't matter in the asexual case) +pop.track_locus_genealogy([L//2]) #initialize the populations pop.set_wildtype(pop.carrying_capacity) diff --git a/examples/speed_highd.py b/examples/speed_highd.py index 28d2c1c..e07f4b1 100644 --- a/examples/speed_highd.py +++ b/examples/speed_highd.py @@ -41,7 +41,7 @@ pop.set_wildtype(N) # set a wildtype population of size N - pop.evolve(1.0 / (L * (mu + r))) # evolve until equilibrium + pop.evolve(int(1.0 / (L * (mu + r)))) # evolve until equilibrium # run for G generations to measure execution time t1=time.time() diff --git a/setup.py b/setup.py index 2f0cf2d..d00e9b9 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,8 @@ # vim: fdm=indent import sys +import subprocess +import os # Python 3.6 compatibility: Python 3.6 has no compatible version of setuptools that supports # PEP-517 (the `pyproject.toml`-based config), so we use a shim package `ppsetuptools` instead. @@ -12,6 +14,31 @@ import numpy as np +# Get GSL include paths +def get_gsl_include(): + try: + output = subprocess.check_output(['gsl-config', '--cflags'], stderr=subprocess.DEVNULL) + cflags = output.decode().strip().split() + return [flag[2:] for flag in cflags if flag.startswith('-I')] + except: + return [] + +# Get Boost include paths +def get_boost_include(): + for path in ['/opt/homebrew/opt/boost/include', '/usr/local/opt/boost/include', '/opt/local/include']: + if os.path.isdir(path): + return [path] + return [] + +# Get GSL library paths +def get_gsl_lib_dirs(): + try: + output = subprocess.check_output(['gsl-config', '--libs'], stderr=subprocess.DEVNULL) + ldflags = output.decode().strip().split() + return [flag[2:] for flag in ldflags if flag.startswith('-L')] + except: + return [] + setup_args = dict( py_modules=["FFPopSim"], package_dir={ '': 'src/python' }, @@ -29,8 +56,10 @@ 'src/hypercube_lowd.cpp', 'src/hypercube_highd.cpp', ], - include_dirs=[np.get_include()], + include_dirs=[np.get_include()] + get_gsl_include() + get_boost_include(), + library_dirs=get_gsl_lib_dirs(), libraries=['gsl', 'gslcblas'], + extra_compile_args=['-std=c++11'], py_limited_api = True ) ] diff --git a/src/haploid_highd.cpp b/src/haploid_highd.cpp index 1daf593..ca2a072 100644 --- a/src/haploid_highd.cpp +++ b/src/haploid_highd.cpp @@ -187,9 +187,18 @@ int haploid_highd::free_mem() { cerr <<"haploid_highd::free_mem(): No memory allocated!\n"; return HP_BADARG; } else { + delete [] genome; + delete [] crossovers; delete [] allele_frequencies; delete [] gamete_allele_frequencies; delete [] trait; + delete [] trait_stat; + for (int t = 0; t < number_of_traits; t++){ + delete [] trait_covariance[t]; + } + delete [] trait_covariance; + delete [] trait_weights; + gsl_rng_free(evo_generator); mem = false; return 0; } @@ -203,6 +212,10 @@ int haploid_highd::free_mem() { int haploid_highd::provide_at_least(int n) { //calculate the number of clones that need to be newly allocated. Allow for some slack //to avoid calling this too often + // BUG FIX: Check if we already have enough clones to avoid unsigned arithmetic underflow + if (available_clones.size() >= n) { + return 0; // We already have enough clones available + } int needed_gts = n - available_clones.size() + 100 + 0.1 * population.size(); //allocate at the necessary memory diff --git a/src/python/FFPopSim.py b/src/python/FFPopSim.py new file mode 100644 index 0000000..f744bb4 --- /dev/null +++ b/src/python/FFPopSim.py @@ -0,0 +1,3464 @@ +# This file was automatically generated by SWIG (https://www.swig.org). +# Version 4.3.1 +# +# Do not make changes to this file unless you know what you are doing - modify +# the SWIG interface file instead. + +""" +C++/Python library for population genetics. + +This library offers *two* simulation packages for population genetics: one for +low-dimensional simulations (up to ~15 loci) and one for high-dimensional ones. + +Each package is based on a big class that represents a population: + + - ``haploid_lowd`` for low-dimensional populations + - ``haploid_highd`` for high-dimensional simulations + +A simple example routine is the following:: + + ##################################### + # EXAMPLE SCRIPT # + ##################################### + import numpy as np + import matplotlib.pyplot as plt + import FFPopSim as h + + c = h.haploid_lowd(4) + c.set_allele_frequencies([0,0.3,0.6,0.9], N=1000) + c.evolve(100) + c.plot_diversity_histogram() + plt.show() + ##################################### + +which evolves a population with 4 loci for 100 generations starting from fixed +allele frequencies, under neutral conditions, and plots the diversity +histogram afterwards. + +For more usage examples, please consult the ``tests`` and ``examples`` folders. + +""" + +from sys import version_info as _swig_python_version_info +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _FFPopSim +else: + import _FFPopSim + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +_swig_new_instance_method = _FFPopSim.SWIG_PyInstanceMethod_New +_swig_new_static_method = _FFPopSim.SWIG_PyStaticMethod_New + +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 == "this": + set(self, name, value) + elif name == "thisown": + self.this.own(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__ = _FFPopSim.delete_SwigPyIterator + value = _swig_new_instance_method(_FFPopSim.SwigPyIterator_value) + incr = _swig_new_instance_method(_FFPopSim.SwigPyIterator_incr) + decr = _swig_new_instance_method(_FFPopSim.SwigPyIterator_decr) + distance = _swig_new_instance_method(_FFPopSim.SwigPyIterator_distance) + equal = _swig_new_instance_method(_FFPopSim.SwigPyIterator_equal) + copy = _swig_new_instance_method(_FFPopSim.SwigPyIterator_copy) + next = _swig_new_instance_method(_FFPopSim.SwigPyIterator_next) + __next__ = _swig_new_instance_method(_FFPopSim.SwigPyIterator___next__) + previous = _swig_new_instance_method(_FFPopSim.SwigPyIterator_previous) + advance = _swig_new_instance_method(_FFPopSim.SwigPyIterator_advance) + __eq__ = _swig_new_instance_method(_FFPopSim.SwigPyIterator___eq__) + __ne__ = _swig_new_instance_method(_FFPopSim.SwigPyIterator___ne__) + __iadd__ = _swig_new_instance_method(_FFPopSim.SwigPyIterator___iadd__) + __isub__ = _swig_new_instance_method(_FFPopSim.SwigPyIterator___isub__) + __add__ = _swig_new_instance_method(_FFPopSim.SwigPyIterator___add__) + __sub__ = _swig_new_instance_method(_FFPopSim.SwigPyIterator___sub__) + def __iter__(self): + return self + +# Register SwigPyIterator in _FFPopSim: +_FFPopSim.SwigPyIterator_swigregister(SwigPyIterator) +class _intVector(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + iterator = _swig_new_instance_method(_FFPopSim._intVector_iterator) + def __iter__(self): + return self.iterator() + __nonzero__ = _swig_new_instance_method(_FFPopSim._intVector___nonzero__) + __bool__ = _swig_new_instance_method(_FFPopSim._intVector___bool__) + __len__ = _swig_new_instance_method(_FFPopSim._intVector___len__) + __getslice__ = _swig_new_instance_method(_FFPopSim._intVector___getslice__) + __setslice__ = _swig_new_instance_method(_FFPopSim._intVector___setslice__) + __delslice__ = _swig_new_instance_method(_FFPopSim._intVector___delslice__) + __delitem__ = _swig_new_instance_method(_FFPopSim._intVector___delitem__) + __getitem__ = _swig_new_instance_method(_FFPopSim._intVector___getitem__) + __setitem__ = _swig_new_instance_method(_FFPopSim._intVector___setitem__) + pop = _swig_new_instance_method(_FFPopSim._intVector_pop) + append = _swig_new_instance_method(_FFPopSim._intVector_append) + empty = _swig_new_instance_method(_FFPopSim._intVector_empty) + size = _swig_new_instance_method(_FFPopSim._intVector_size) + swap = _swig_new_instance_method(_FFPopSim._intVector_swap) + begin = _swig_new_instance_method(_FFPopSim._intVector_begin) + end = _swig_new_instance_method(_FFPopSim._intVector_end) + rbegin = _swig_new_instance_method(_FFPopSim._intVector_rbegin) + rend = _swig_new_instance_method(_FFPopSim._intVector_rend) + clear = _swig_new_instance_method(_FFPopSim._intVector_clear) + get_allocator = _swig_new_instance_method(_FFPopSim._intVector_get_allocator) + pop_back = _swig_new_instance_method(_FFPopSim._intVector_pop_back) + erase = _swig_new_instance_method(_FFPopSim._intVector_erase) + + def __init__(self, *args): + _FFPopSim._intVector_swiginit(self, _FFPopSim.new__intVector(*args)) + push_back = _swig_new_instance_method(_FFPopSim._intVector_push_back) + front = _swig_new_instance_method(_FFPopSim._intVector_front) + back = _swig_new_instance_method(_FFPopSim._intVector_back) + assign = _swig_new_instance_method(_FFPopSim._intVector_assign) + resize = _swig_new_instance_method(_FFPopSim._intVector_resize) + insert = _swig_new_instance_method(_FFPopSim._intVector_insert) + reserve = _swig_new_instance_method(_FFPopSim._intVector_reserve) + capacity = _swig_new_instance_method(_FFPopSim._intVector_capacity) + __swig_destroy__ = _FFPopSim.delete__intVector + +# Register _intVector in _FFPopSim: +_FFPopSim._intVector_swigregister(_intVector) +class vector_tree_step(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + iterator = _swig_new_instance_method(_FFPopSim.vector_tree_step_iterator) + def __iter__(self): + return self.iterator() + __nonzero__ = _swig_new_instance_method(_FFPopSim.vector_tree_step___nonzero__) + __bool__ = _swig_new_instance_method(_FFPopSim.vector_tree_step___bool__) + __len__ = _swig_new_instance_method(_FFPopSim.vector_tree_step___len__) + __getslice__ = _swig_new_instance_method(_FFPopSim.vector_tree_step___getslice__) + __setslice__ = _swig_new_instance_method(_FFPopSim.vector_tree_step___setslice__) + __delslice__ = _swig_new_instance_method(_FFPopSim.vector_tree_step___delslice__) + __delitem__ = _swig_new_instance_method(_FFPopSim.vector_tree_step___delitem__) + __getitem__ = _swig_new_instance_method(_FFPopSim.vector_tree_step___getitem__) + __setitem__ = _swig_new_instance_method(_FFPopSim.vector_tree_step___setitem__) + pop = _swig_new_instance_method(_FFPopSim.vector_tree_step_pop) + append = _swig_new_instance_method(_FFPopSim.vector_tree_step_append) + empty = _swig_new_instance_method(_FFPopSim.vector_tree_step_empty) + size = _swig_new_instance_method(_FFPopSim.vector_tree_step_size) + swap = _swig_new_instance_method(_FFPopSim.vector_tree_step_swap) + begin = _swig_new_instance_method(_FFPopSim.vector_tree_step_begin) + end = _swig_new_instance_method(_FFPopSim.vector_tree_step_end) + rbegin = _swig_new_instance_method(_FFPopSim.vector_tree_step_rbegin) + rend = _swig_new_instance_method(_FFPopSim.vector_tree_step_rend) + clear = _swig_new_instance_method(_FFPopSim.vector_tree_step_clear) + get_allocator = _swig_new_instance_method(_FFPopSim.vector_tree_step_get_allocator) + pop_back = _swig_new_instance_method(_FFPopSim.vector_tree_step_pop_back) + erase = _swig_new_instance_method(_FFPopSim.vector_tree_step_erase) + + def __init__(self, *args): + _FFPopSim.vector_tree_step_swiginit(self, _FFPopSim.new_vector_tree_step(*args)) + push_back = _swig_new_instance_method(_FFPopSim.vector_tree_step_push_back) + front = _swig_new_instance_method(_FFPopSim.vector_tree_step_front) + back = _swig_new_instance_method(_FFPopSim.vector_tree_step_back) + assign = _swig_new_instance_method(_FFPopSim.vector_tree_step_assign) + resize = _swig_new_instance_method(_FFPopSim.vector_tree_step_resize) + insert = _swig_new_instance_method(_FFPopSim.vector_tree_step_insert) + reserve = _swig_new_instance_method(_FFPopSim.vector_tree_step_reserve) + capacity = _swig_new_instance_method(_FFPopSim.vector_tree_step_capacity) + __swig_destroy__ = _FFPopSim.delete_vector_tree_step + +# Register vector_tree_step in _FFPopSim: +_FFPopSim.vector_tree_step_swigregister(vector_tree_step) +class vector_tree_key(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + iterator = _swig_new_instance_method(_FFPopSim.vector_tree_key_iterator) + def __iter__(self): + return self.iterator() + __nonzero__ = _swig_new_instance_method(_FFPopSim.vector_tree_key___nonzero__) + __bool__ = _swig_new_instance_method(_FFPopSim.vector_tree_key___bool__) + __len__ = _swig_new_instance_method(_FFPopSim.vector_tree_key___len__) + __getslice__ = _swig_new_instance_method(_FFPopSim.vector_tree_key___getslice__) + __setslice__ = _swig_new_instance_method(_FFPopSim.vector_tree_key___setslice__) + __delslice__ = _swig_new_instance_method(_FFPopSim.vector_tree_key___delslice__) + __delitem__ = _swig_new_instance_method(_FFPopSim.vector_tree_key___delitem__) + __getitem__ = _swig_new_instance_method(_FFPopSim.vector_tree_key___getitem__) + __setitem__ = _swig_new_instance_method(_FFPopSim.vector_tree_key___setitem__) + pop = _swig_new_instance_method(_FFPopSim.vector_tree_key_pop) + append = _swig_new_instance_method(_FFPopSim.vector_tree_key_append) + empty = _swig_new_instance_method(_FFPopSim.vector_tree_key_empty) + size = _swig_new_instance_method(_FFPopSim.vector_tree_key_size) + swap = _swig_new_instance_method(_FFPopSim.vector_tree_key_swap) + begin = _swig_new_instance_method(_FFPopSim.vector_tree_key_begin) + end = _swig_new_instance_method(_FFPopSim.vector_tree_key_end) + rbegin = _swig_new_instance_method(_FFPopSim.vector_tree_key_rbegin) + rend = _swig_new_instance_method(_FFPopSim.vector_tree_key_rend) + clear = _swig_new_instance_method(_FFPopSim.vector_tree_key_clear) + get_allocator = _swig_new_instance_method(_FFPopSim.vector_tree_key_get_allocator) + pop_back = _swig_new_instance_method(_FFPopSim.vector_tree_key_pop_back) + erase = _swig_new_instance_method(_FFPopSim.vector_tree_key_erase) + + def __init__(self, *args): + _FFPopSim.vector_tree_key_swiginit(self, _FFPopSim.new_vector_tree_key(*args)) + push_back = _swig_new_instance_method(_FFPopSim.vector_tree_key_push_back) + front = _swig_new_instance_method(_FFPopSim.vector_tree_key_front) + back = _swig_new_instance_method(_FFPopSim.vector_tree_key_back) + assign = _swig_new_instance_method(_FFPopSim.vector_tree_key_assign) + resize = _swig_new_instance_method(_FFPopSim.vector_tree_key_resize) + insert = _swig_new_instance_method(_FFPopSim.vector_tree_key_insert) + reserve = _swig_new_instance_method(_FFPopSim.vector_tree_key_reserve) + capacity = _swig_new_instance_method(_FFPopSim.vector_tree_key_capacity) + __swig_destroy__ = _FFPopSim.delete_vector_tree_key + +# Register vector_tree_key in _FFPopSim: +_FFPopSim.vector_tree_key_swigregister(vector_tree_key) +class list_tree_key(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + iterator = _swig_new_instance_method(_FFPopSim.list_tree_key_iterator) + def __iter__(self): + return self.iterator() + __nonzero__ = _swig_new_instance_method(_FFPopSim.list_tree_key___nonzero__) + __bool__ = _swig_new_instance_method(_FFPopSim.list_tree_key___bool__) + __len__ = _swig_new_instance_method(_FFPopSim.list_tree_key___len__) + __getslice__ = _swig_new_instance_method(_FFPopSim.list_tree_key___getslice__) + __setslice__ = _swig_new_instance_method(_FFPopSim.list_tree_key___setslice__) + __delslice__ = _swig_new_instance_method(_FFPopSim.list_tree_key___delslice__) + __delitem__ = _swig_new_instance_method(_FFPopSim.list_tree_key___delitem__) + __getitem__ = _swig_new_instance_method(_FFPopSim.list_tree_key___getitem__) + __setitem__ = _swig_new_instance_method(_FFPopSim.list_tree_key___setitem__) + pop = _swig_new_instance_method(_FFPopSim.list_tree_key_pop) + append = _swig_new_instance_method(_FFPopSim.list_tree_key_append) + empty = _swig_new_instance_method(_FFPopSim.list_tree_key_empty) + size = _swig_new_instance_method(_FFPopSim.list_tree_key_size) + swap = _swig_new_instance_method(_FFPopSim.list_tree_key_swap) + begin = _swig_new_instance_method(_FFPopSim.list_tree_key_begin) + end = _swig_new_instance_method(_FFPopSim.list_tree_key_end) + rbegin = _swig_new_instance_method(_FFPopSim.list_tree_key_rbegin) + rend = _swig_new_instance_method(_FFPopSim.list_tree_key_rend) + clear = _swig_new_instance_method(_FFPopSim.list_tree_key_clear) + get_allocator = _swig_new_instance_method(_FFPopSim.list_tree_key_get_allocator) + pop_back = _swig_new_instance_method(_FFPopSim.list_tree_key_pop_back) + erase = _swig_new_instance_method(_FFPopSim.list_tree_key_erase) + + def __init__(self, *args): + _FFPopSim.list_tree_key_swiginit(self, _FFPopSim.new_list_tree_key(*args)) + push_back = _swig_new_instance_method(_FFPopSim.list_tree_key_push_back) + front = _swig_new_instance_method(_FFPopSim.list_tree_key_front) + back = _swig_new_instance_method(_FFPopSim.list_tree_key_back) + assign = _swig_new_instance_method(_FFPopSim.list_tree_key_assign) + resize = _swig_new_instance_method(_FFPopSim.list_tree_key_resize) + insert = _swig_new_instance_method(_FFPopSim.list_tree_key_insert) + pop_front = _swig_new_instance_method(_FFPopSim.list_tree_key_pop_front) + push_front = _swig_new_instance_method(_FFPopSim.list_tree_key_push_front) + reverse = _swig_new_instance_method(_FFPopSim.list_tree_key_reverse) + __swig_destroy__ = _FFPopSim.delete_list_tree_key + +# Register list_tree_key in _FFPopSim: +_FFPopSim.list_tree_key_swigregister(list_tree_key) +class map_key_edge(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + iterator = _swig_new_instance_method(_FFPopSim.map_key_edge_iterator) + def __iter__(self): + return self.iterator() + __nonzero__ = _swig_new_instance_method(_FFPopSim.map_key_edge___nonzero__) + __bool__ = _swig_new_instance_method(_FFPopSim.map_key_edge___bool__) + __len__ = _swig_new_instance_method(_FFPopSim.map_key_edge___len__) + def __iter__(self): + return self.key_iterator() + def iterkeys(self): + return self.key_iterator() + def itervalues(self): + return self.value_iterator() + def iteritems(self): + return self.iterator() + __getitem__ = _swig_new_instance_method(_FFPopSim.map_key_edge___getitem__) + __delitem__ = _swig_new_instance_method(_FFPopSim.map_key_edge___delitem__) + has_key = _swig_new_instance_method(_FFPopSim.map_key_edge_has_key) + keys = _swig_new_instance_method(_FFPopSim.map_key_edge_keys) + values = _swig_new_instance_method(_FFPopSim.map_key_edge_values) + items = _swig_new_instance_method(_FFPopSim.map_key_edge_items) + __contains__ = _swig_new_instance_method(_FFPopSim.map_key_edge___contains__) + key_iterator = _swig_new_instance_method(_FFPopSim.map_key_edge_key_iterator) + value_iterator = _swig_new_instance_method(_FFPopSim.map_key_edge_value_iterator) + __setitem__ = _swig_new_instance_method(_FFPopSim.map_key_edge___setitem__) + asdict = _swig_new_instance_method(_FFPopSim.map_key_edge_asdict) + + def __init__(self, *args): + _FFPopSim.map_key_edge_swiginit(self, _FFPopSim.new_map_key_edge(*args)) + empty = _swig_new_instance_method(_FFPopSim.map_key_edge_empty) + size = _swig_new_instance_method(_FFPopSim.map_key_edge_size) + swap = _swig_new_instance_method(_FFPopSim.map_key_edge_swap) + begin = _swig_new_instance_method(_FFPopSim.map_key_edge_begin) + end = _swig_new_instance_method(_FFPopSim.map_key_edge_end) + rbegin = _swig_new_instance_method(_FFPopSim.map_key_edge_rbegin) + rend = _swig_new_instance_method(_FFPopSim.map_key_edge_rend) + clear = _swig_new_instance_method(_FFPopSim.map_key_edge_clear) + get_allocator = _swig_new_instance_method(_FFPopSim.map_key_edge_get_allocator) + count = _swig_new_instance_method(_FFPopSim.map_key_edge_count) + erase = _swig_new_instance_method(_FFPopSim.map_key_edge_erase) + find = _swig_new_instance_method(_FFPopSim.map_key_edge_find) + lower_bound = _swig_new_instance_method(_FFPopSim.map_key_edge_lower_bound) + upper_bound = _swig_new_instance_method(_FFPopSim.map_key_edge_upper_bound) + __swig_destroy__ = _FFPopSim.delete_map_key_edge + +# Register map_key_edge in _FFPopSim: +_FFPopSim.map_key_edge_swigregister(map_key_edge) +class map_key_node(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + iterator = _swig_new_instance_method(_FFPopSim.map_key_node_iterator) + def __iter__(self): + return self.iterator() + __nonzero__ = _swig_new_instance_method(_FFPopSim.map_key_node___nonzero__) + __bool__ = _swig_new_instance_method(_FFPopSim.map_key_node___bool__) + __len__ = _swig_new_instance_method(_FFPopSim.map_key_node___len__) + def __iter__(self): + return self.key_iterator() + def iterkeys(self): + return self.key_iterator() + def itervalues(self): + return self.value_iterator() + def iteritems(self): + return self.iterator() + __getitem__ = _swig_new_instance_method(_FFPopSim.map_key_node___getitem__) + __delitem__ = _swig_new_instance_method(_FFPopSim.map_key_node___delitem__) + has_key = _swig_new_instance_method(_FFPopSim.map_key_node_has_key) + keys = _swig_new_instance_method(_FFPopSim.map_key_node_keys) + values = _swig_new_instance_method(_FFPopSim.map_key_node_values) + items = _swig_new_instance_method(_FFPopSim.map_key_node_items) + __contains__ = _swig_new_instance_method(_FFPopSim.map_key_node___contains__) + key_iterator = _swig_new_instance_method(_FFPopSim.map_key_node_key_iterator) + value_iterator = _swig_new_instance_method(_FFPopSim.map_key_node_value_iterator) + __setitem__ = _swig_new_instance_method(_FFPopSim.map_key_node___setitem__) + asdict = _swig_new_instance_method(_FFPopSim.map_key_node_asdict) + + def __init__(self, *args): + _FFPopSim.map_key_node_swiginit(self, _FFPopSim.new_map_key_node(*args)) + empty = _swig_new_instance_method(_FFPopSim.map_key_node_empty) + size = _swig_new_instance_method(_FFPopSim.map_key_node_size) + swap = _swig_new_instance_method(_FFPopSim.map_key_node_swap) + begin = _swig_new_instance_method(_FFPopSim.map_key_node_begin) + end = _swig_new_instance_method(_FFPopSim.map_key_node_end) + rbegin = _swig_new_instance_method(_FFPopSim.map_key_node_rbegin) + rend = _swig_new_instance_method(_FFPopSim.map_key_node_rend) + clear = _swig_new_instance_method(_FFPopSim.map_key_node_clear) + get_allocator = _swig_new_instance_method(_FFPopSim.map_key_node_get_allocator) + count = _swig_new_instance_method(_FFPopSim.map_key_node_count) + erase = _swig_new_instance_method(_FFPopSim.map_key_node_erase) + find = _swig_new_instance_method(_FFPopSim.map_key_node_find) + lower_bound = _swig_new_instance_method(_FFPopSim.map_key_node_lower_bound) + upper_bound = _swig_new_instance_method(_FFPopSim.map_key_node_upper_bound) + __swig_destroy__ = _FFPopSim.delete_map_key_node + +# Register map_key_node in _FFPopSim: +_FFPopSim.map_key_node_swigregister(map_key_node) +class vector_polymorphism(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + iterator = _swig_new_instance_method(_FFPopSim.vector_polymorphism_iterator) + def __iter__(self): + return self.iterator() + __nonzero__ = _swig_new_instance_method(_FFPopSim.vector_polymorphism___nonzero__) + __bool__ = _swig_new_instance_method(_FFPopSim.vector_polymorphism___bool__) + __len__ = _swig_new_instance_method(_FFPopSim.vector_polymorphism___len__) + __getslice__ = _swig_new_instance_method(_FFPopSim.vector_polymorphism___getslice__) + __setslice__ = _swig_new_instance_method(_FFPopSim.vector_polymorphism___setslice__) + __delslice__ = _swig_new_instance_method(_FFPopSim.vector_polymorphism___delslice__) + __delitem__ = _swig_new_instance_method(_FFPopSim.vector_polymorphism___delitem__) + __getitem__ = _swig_new_instance_method(_FFPopSim.vector_polymorphism___getitem__) + __setitem__ = _swig_new_instance_method(_FFPopSim.vector_polymorphism___setitem__) + pop = _swig_new_instance_method(_FFPopSim.vector_polymorphism_pop) + append = _swig_new_instance_method(_FFPopSim.vector_polymorphism_append) + empty = _swig_new_instance_method(_FFPopSim.vector_polymorphism_empty) + size = _swig_new_instance_method(_FFPopSim.vector_polymorphism_size) + swap = _swig_new_instance_method(_FFPopSim.vector_polymorphism_swap) + begin = _swig_new_instance_method(_FFPopSim.vector_polymorphism_begin) + end = _swig_new_instance_method(_FFPopSim.vector_polymorphism_end) + rbegin = _swig_new_instance_method(_FFPopSim.vector_polymorphism_rbegin) + rend = _swig_new_instance_method(_FFPopSim.vector_polymorphism_rend) + clear = _swig_new_instance_method(_FFPopSim.vector_polymorphism_clear) + get_allocator = _swig_new_instance_method(_FFPopSim.vector_polymorphism_get_allocator) + pop_back = _swig_new_instance_method(_FFPopSim.vector_polymorphism_pop_back) + erase = _swig_new_instance_method(_FFPopSim.vector_polymorphism_erase) + + def __init__(self, *args): + _FFPopSim.vector_polymorphism_swiginit(self, _FFPopSim.new_vector_polymorphism(*args)) + push_back = _swig_new_instance_method(_FFPopSim.vector_polymorphism_push_back) + front = _swig_new_instance_method(_FFPopSim.vector_polymorphism_front) + back = _swig_new_instance_method(_FFPopSim.vector_polymorphism_back) + assign = _swig_new_instance_method(_FFPopSim.vector_polymorphism_assign) + resize = _swig_new_instance_method(_FFPopSim.vector_polymorphism_resize) + insert = _swig_new_instance_method(_FFPopSim.vector_polymorphism_insert) + reserve = _swig_new_instance_method(_FFPopSim.vector_polymorphism_reserve) + capacity = _swig_new_instance_method(_FFPopSim.vector_polymorphism_capacity) + __swig_destroy__ = _FFPopSim.delete_vector_polymorphism + +# Register vector_polymorphism in _FFPopSim: +_FFPopSim.vector_polymorphism_swigregister(vector_polymorphism) +class vector_tree_node(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + iterator = _swig_new_instance_method(_FFPopSim.vector_tree_node_iterator) + def __iter__(self): + return self.iterator() + __nonzero__ = _swig_new_instance_method(_FFPopSim.vector_tree_node___nonzero__) + __bool__ = _swig_new_instance_method(_FFPopSim.vector_tree_node___bool__) + __len__ = _swig_new_instance_method(_FFPopSim.vector_tree_node___len__) + __getslice__ = _swig_new_instance_method(_FFPopSim.vector_tree_node___getslice__) + __setslice__ = _swig_new_instance_method(_FFPopSim.vector_tree_node___setslice__) + __delslice__ = _swig_new_instance_method(_FFPopSim.vector_tree_node___delslice__) + __delitem__ = _swig_new_instance_method(_FFPopSim.vector_tree_node___delitem__) + __getitem__ = _swig_new_instance_method(_FFPopSim.vector_tree_node___getitem__) + __setitem__ = _swig_new_instance_method(_FFPopSim.vector_tree_node___setitem__) + pop = _swig_new_instance_method(_FFPopSim.vector_tree_node_pop) + append = _swig_new_instance_method(_FFPopSim.vector_tree_node_append) + empty = _swig_new_instance_method(_FFPopSim.vector_tree_node_empty) + size = _swig_new_instance_method(_FFPopSim.vector_tree_node_size) + swap = _swig_new_instance_method(_FFPopSim.vector_tree_node_swap) + begin = _swig_new_instance_method(_FFPopSim.vector_tree_node_begin) + end = _swig_new_instance_method(_FFPopSim.vector_tree_node_end) + rbegin = _swig_new_instance_method(_FFPopSim.vector_tree_node_rbegin) + rend = _swig_new_instance_method(_FFPopSim.vector_tree_node_rend) + clear = _swig_new_instance_method(_FFPopSim.vector_tree_node_clear) + get_allocator = _swig_new_instance_method(_FFPopSim.vector_tree_node_get_allocator) + pop_back = _swig_new_instance_method(_FFPopSim.vector_tree_node_pop_back) + erase = _swig_new_instance_method(_FFPopSim.vector_tree_node_erase) + + def __init__(self, *args): + _FFPopSim.vector_tree_node_swiginit(self, _FFPopSim.new_vector_tree_node(*args)) + push_back = _swig_new_instance_method(_FFPopSim.vector_tree_node_push_back) + front = _swig_new_instance_method(_FFPopSim.vector_tree_node_front) + back = _swig_new_instance_method(_FFPopSim.vector_tree_node_back) + assign = _swig_new_instance_method(_FFPopSim.vector_tree_node_assign) + resize = _swig_new_instance_method(_FFPopSim.vector_tree_node_resize) + insert = _swig_new_instance_method(_FFPopSim.vector_tree_node_insert) + reserve = _swig_new_instance_method(_FFPopSim.vector_tree_node_reserve) + capacity = _swig_new_instance_method(_FFPopSim.vector_tree_node_capacity) + __swig_destroy__ = _FFPopSim.delete_vector_tree_node + +# Register vector_tree_node in _FFPopSim: +_FFPopSim.vector_tree_node_swigregister(vector_tree_node) + +LICENSE = '''FFPopSim is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. FFPopSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with FFPopSim. If not, see .''' + + +import numpy as _np + +FREE_RECOMBINATION = _FFPopSim.FREE_RECOMBINATION + +CROSSOVERS = _FFPopSim.CROSSOVERS + +SINGLE_CROSSOVER = _FFPopSim.SINGLE_CROSSOVER + +class index_value_pair(object): + r"""Pair of an index and a value""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + index = property(_FFPopSim.index_value_pair_index_get, _FFPopSim.index_value_pair_index_set, doc=r"""Index""") + val = property(_FFPopSim.index_value_pair_val_get, _FFPopSim.index_value_pair_val_set, doc=r"""Value""") + + def __init__(self, *args, **kwargs): + r"""Pair of an index and a value""" + _FFPopSim.index_value_pair_swiginit(self, _FFPopSim.new_index_value_pair(*args, **kwargs)) + __str__ = _swig_new_instance_method(_FFPopSim.index_value_pair___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.index_value_pair___repr__) + __swig_destroy__ = _FFPopSim.delete_index_value_pair + +# Register index_value_pair in _FFPopSim: +_FFPopSim.index_value_pair_swigregister(index_value_pair) +class genotype_value_pair(object): + r"""Pair of a genotype and a value""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + genotype = property(_FFPopSim.genotype_value_pair_genotype_get, _FFPopSim.genotype_value_pair_genotype_set, doc=r"""Genotype""") + val = property(_FFPopSim.genotype_value_pair_val_get, _FFPopSim.genotype_value_pair_val_set, doc=r"""Value""") + + def __init__(self, *args, **kwargs): + r"""Pair of a genotype and a value""" + _FFPopSim.genotype_value_pair_swiginit(self, _FFPopSim.new_genotype_value_pair(*args, **kwargs)) + __str__ = _swig_new_instance_method(_FFPopSim.genotype_value_pair___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.genotype_value_pair___repr__) + __swig_destroy__ = _FFPopSim.delete_genotype_value_pair + +# Register genotype_value_pair in _FFPopSim: +_FFPopSim.genotype_value_pair_swigregister(genotype_value_pair) +class stat(object): + r"""Mean and variance of a statistical distribution""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + mean = property(_FFPopSim.stat_mean_get, _FFPopSim.stat_mean_set, doc=r"""Mean""") + variance = property(_FFPopSim.stat_variance_get, _FFPopSim.stat_variance_set, doc=r"""Variance""") + + def __init__(self, *args, **kwargs): + r"""Mean and variance of a statistical distribution""" + _FFPopSim.stat_swiginit(self, _FFPopSim.new_stat(*args, **kwargs)) + __str__ = _swig_new_instance_method(_FFPopSim.stat___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.stat___repr__) + __swig_destroy__ = _FFPopSim.delete_stat + +# Register stat in _FFPopSim: +_FFPopSim.stat_swigregister(stat) + +def binarify(gt, L=0): + '''Transform an integer into a binary sequence on the L hypercube. + + Parameters: + - gt: integer representing a genotype + - L: number of dimensions of the hypercube + + Returns: + - genotype: bool vector representing the same genotype + + **Examples**: + + .. sourcecode:: ipython + + In [1]: binarify(3, 5) + Out[1]: array([False, False, False, True, True], dtype=bool) + + In [2]: FFPopSim.binarify(0b11, 5) + Out[2]: array([False, False, False, True, True], dtype=bool) + ''' + if not L: + L=1 + while gt > ((1<= self.L - 1): + raise ValueError("Expecting a locus from 0 to L - 2.") + + + return _FFPopSim.haploid_lowd_get_recombination_rate(self, *args, **kwargs) + + + def set_allele_frequencies(self, *args, **kwargs): + r""" + Initialize the population in linkage equilibrium with specified allele frequencies. + + Parameters: + - frequencies: an array of length L with all allele frequencies + - N: set the population size and, if still unset, the carrying + capacity to this value + + .. note:: the population size is only used for resampling and has therefore + no effect on the speed of the simulation. + + """ + + if len(args) and (len(args[0]) != self.L): + raise ValueError('The input array of allele frequencies has the wrong length.') + + + val = _FFPopSim.haploid_lowd_set_allele_frequencies(self, *args, **kwargs) + + return None + + + return val + + + def set_wildtype(self, *args, **kwargs): + r""" + Initialize population of N individuals with the - allele at all loci (wildtype) + + Parameters: + - N: the number of individuals + + .. note:: the carrying capacity is set to the same value if still unset. + + """ + val = _FFPopSim.haploid_lowd_set_wildtype(self, *args, **kwargs) + + return None + + + return val + + _set_recombination_model = _swig_new_instance_method(_FFPopSim.haploid_lowd__set_recombination_model) + _set_recombination_rates = _swig_new_instance_method(_FFPopSim.haploid_lowd__set_recombination_rates) + + def evolve(self, *args, **kwargs): + r""" + Evolve for some generations + + Parameters: + - gen: number of generations to evolve the population, defaults to one + + """ + val = _FFPopSim.haploid_lowd_evolve(self, *args, **kwargs) + + return None + + + return val + + + def evolve_norec(self, *args, **kwargs): + r""" + Evolve for some generations without recombination + + Parameters: + - gen: number of generations to evolve the population + + """ + val = _FFPopSim.haploid_lowd_evolve_norec(self, *args, **kwargs) + + return None + + + return val + + + def evolve_deterministic(self, *args, **kwargs): + r""" + Evolve for some generations deterministically (skips the resampling) + + Parameters: + - gen: number of generations to evolve the population + + """ + val = _FFPopSim.haploid_lowd_evolve_deterministic(self, *args, **kwargs) + + return None + + + return val + + + def get_genotype_frequency(self, *args, **kwargs): + r""" + Get the frequency of a genotype + + Parameters: + - genotype: genotype, whose the frequency is to be returned + + Returns: + - the frequency of the genotype + + """ + + if len(args) and (args[0] >= (1<}{2}`, where :math:`s_i \in \{-1, 1\}`. + + """ + + if len(args) and (args[0] >= (self.L)): + raise ValueError("Expecting a locus from 0 to L - 1.") + + + return _FFPopSim.haploid_lowd_get_allele_frequency(self, *args, **kwargs) + + + def get_pair_frequency(self, *args, **kwargs): + r""" + Get the frequency of genotypes with the + allele at both loci. + + Parameters: + - locus1: first locus + - locus2: second locus + + Returns: + - the joint frequency of the + alleles + + """ + + if (len(args) >= 2) and ((args[0] >= (self.L)) or (args[1] >= (self.L))): + raise ValueError("Expecting loci from 0 to L - 1.") + + + return _FFPopSim.haploid_lowd_get_pair_frequency(self, *args, **kwargs) + + + def get_chi(self, *args, **kwargs): + r""" + Get chi of an allele in the -/+ basis + + Parameters: + - locus: locus whose chi is to be computed + + Returns: + - the chi of that allele, :math:`\chi_i := \left`, where :math:`s_i \in \{-1, 1\}`. + + """ + + if len(args) and (args[0] >= (self.L)): + raise ValueError("Expecting a locus from 0 to L - 1.") + + + return _FFPopSim.haploid_lowd_get_chi(self, *args, **kwargs) + + + def get_chi2(self, *args, **kwargs): + r""" + Get :math:`\chi_{ij}` + + Parameters: + - locus1: first locus + - locus2: second locus + + Returns: + - the linkage disequilibiurm between them, i.e. :math:`\chi_{ij} := \left - \chi_i \cdot \chi_j`. + + """ + + if (len(args) >= 2) and ((args[0] >= (self.L)) or (args[1] >= (self.L))): + raise ValueError("Expecting loci from 0 to L - 1.") + + + return _FFPopSim.haploid_lowd_get_chi2(self, *args, **kwargs) + + + def get_LD(self, *args, **kwargs): + r""" + Get linkage disequilibrium + + Parameters: + - locus1: first locus + - locus2: second locus + + Returns: + - the linkage disequilibiurm between them, i.e. :math:`D_{ij} := 1 / 4 \left[\left - \chi_i \cdot \chi_j\right]`. + + """ + + if (len(args) >= 2) and ((args[0] >= (self.L)) or (args[1] >= (self.L))): + raise ValueError("Expecting loci from 0 to L - 1.") + + + return _FFPopSim.haploid_lowd_get_LD(self, *args, **kwargs) + + + def get_moment(self, *args, **kwargs): + r""" + Get moment of two alleles in the -/+ basis + + Parameters: + - locus1: first locus + - locus2: second locus + + Returns: + - the second moment, i.e. :math:`\left`, where :math:`s_i, s_j \in \{-1, 1\}`. + + """ + + if (len(args) >= 2) and ((args[0] >= (self.L)) or (args[1] >= (self.L))): + raise ValueError("Expecting loci from 0 to L - 1.") + + + return _FFPopSim.haploid_lowd_get_moment(self, *args, **kwargs) + + genotype_entropy = _swig_new_instance_method(_FFPopSim.haploid_lowd_genotype_entropy) + allele_entropy = _swig_new_instance_method(_FFPopSim.haploid_lowd_allele_entropy) + + def get_fitness(self, *args, **kwargs): + r""" + Get fitness values of a genotype + + Parameters: + - genotype: genotype whose fitness is to be calculated. This can either be an integer or in binary format, e.g. 5 = 0b101 + + Returns: + - the fitness of that genotype. + + """ + + if len(args) and (args[0] >= (1<= (1<""") + fitness = property(_FFPopSim.tree_node_fitness_get, _FFPopSim.tree_node_fitness_set, doc=r"""Fitness of the clone represented by the node""") + _weight_distribution = property(_FFPopSim.tree_node__weight_distribution_get, _FFPopSim.tree_node__weight_distribution_set, doc=r"""_weight_distribution : vector<(step_t)>""") + number_of_offspring = property(_FFPopSim.tree_node_number_of_offspring_get, _FFPopSim.tree_node_number_of_offspring_set, doc=r"""Number of offspring""") + clone_size = property(_FFPopSim.tree_node_clone_size_get, _FFPopSim.tree_node_clone_size_set, doc=r"""Size of the clone represented by the node""") + sampled = property(_FFPopSim.tree_node_sampled_get, _FFPopSim.tree_node_sampled_set, doc=r"""sampled : int""") + sequence = property(_FFPopSim.tree_node_sequence_get, _FFPopSim.tree_node_sequence_set, doc=r"""sequence : boost::dynamic_bitset<()>""") + __str__ = _swig_new_instance_method(_FFPopSim.tree_node___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.tree_node___repr__) + + @property + def child_edges(self): + '''Child edges of the node''' + return list(self._child_edges) + + + @child_edges.setter + def child_edges(self, es): + self._child_edges = list_tree_key(es) + + _get_crossover_chunk = _swig_new_instance_method(_FFPopSim.tree_node__get_crossover_chunk) + _set_crossover_chunk = _swig_new_instance_method(_FFPopSim.tree_node__set_crossover_chunk) + + @property + def crossover(self): + '''Crossover of node''' + return [self._get_crossover_chunk(i) for i in range(2)] + + @crossover.setter + def crossover(self, value): + if len(value) != 2: + raise ValueError('Crossover is a pair of integers.') + [self._set_crossover_chunk(value[i], i) for i in range(2)] + + + @property + def weight_distribution(self): + '''Distribution of weights of this node''' + return list(self._weight_distribution) + + @weight_distribution.setter + def weight_distribution(self, distr): + self._weight_distribution = vector_tree_step(distr) + + + def __init__(self, *args, **kwargs): + r"""Node of a phylogenetic tree""" + _FFPopSim.tree_node_swiginit(self, _FFPopSim.new_tree_node(*args, **kwargs)) + __swig_destroy__ = _FFPopSim.delete_tree_node + +# Register tree_node in _FFPopSim: +_FFPopSim.tree_node_swigregister(tree_node) +class tree_edge(object): + r"""Edge of a phylogenetic tree""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + parent_node = property(_FFPopSim.tree_edge_parent_node_get, _FFPopSim.tree_edge_parent_node_set, doc=r"""Parent tree key""") + own_key = property(_FFPopSim.tree_edge_own_key_get, _FFPopSim.tree_edge_own_key_set, doc=r"""Own tree key""") + length = property(_FFPopSim.tree_edge_length_get, _FFPopSim.tree_edge_length_set, doc=r"""Edge length [in generations]""") + number_of_offspring = property(_FFPopSim.tree_edge_number_of_offspring_get, _FFPopSim.tree_edge_number_of_offspring_set, doc=r"""Number of offspring""") + __str__ = _swig_new_instance_method(_FFPopSim.tree_edge___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.tree_edge___repr__) + _get_segment_chunk = _swig_new_instance_method(_FFPopSim.tree_edge__get_segment_chunk) + + @property + def segment(self): + '''Segment of edge''' + return [self._get_segment_chunk(i) for i in range(2)] + + + def __init__(self, *args, **kwargs): + r"""Edge of a phylogenetic tree""" + _FFPopSim.tree_edge_swiginit(self, _FFPopSim.new_tree_edge(*args, **kwargs)) + __swig_destroy__ = _FFPopSim.delete_tree_edge + +# Register tree_edge in _FFPopSim: +_FFPopSim.tree_edge_swigregister(tree_edge) +class polymorphism(object): + r"""Polymorphism history""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + birth = property(_FFPopSim.polymorphism_birth_get, _FFPopSim.polymorphism_birth_set, doc=r"""Birth generation""") + sweep_time = property(_FFPopSim.polymorphism_sweep_time_get, _FFPopSim.polymorphism_sweep_time_set, doc=r"""Sweep time [in generations]""") + effect = property(_FFPopSim.polymorphism_effect_get, _FFPopSim.polymorphism_effect_set, doc=r"""Fitness effect of the mutation""") + fitness = property(_FFPopSim.polymorphism_fitness_get, _FFPopSim.polymorphism_fitness_set, doc=r"""Relative fitness of the clone at birth""") + fitness_variance = property(_FFPopSim.polymorphism_fitness_variance_get, _FFPopSim.polymorphism_fitness_variance_set, doc=r"""Fitness variance of the population at birth""") + + def __init__(self, *args, **kwargs): + r"""Polymorphism history""" + _FFPopSim.polymorphism_swiginit(self, _FFPopSim.new_polymorphism(*args, **kwargs)) + __str__ = _swig_new_instance_method(_FFPopSim.polymorphism___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.polymorphism___repr__) + __swig_destroy__ = _FFPopSim.delete_polymorphism + +# Register polymorphism in _FFPopSim: +_FFPopSim.polymorphism_swigregister(polymorphism) +class rooted_tree(object): + r""" + Rooted phylogenetic tree. + + This class is used to represent the phylogenetic tree of a single locus. + It is possible to print the tree in Newick format, to get the subtree + spanned by some of the leaves, and to look at the tree nodes and edges. + + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + _edges = property(_FFPopSim.rooted_tree__edges_get, _FFPopSim.rooted_tree__edges_set, doc=r"""_edges : map<(tree_key_t,edge_t)>""") + _nodes = property(_FFPopSim.rooted_tree__nodes_get, _FFPopSim.rooted_tree__nodes_set, doc=r"""_nodes : map<(tree_key_t,node_t)>""") + _leafs = property(_FFPopSim.rooted_tree__leafs_get, _FFPopSim.rooted_tree__leafs_set, doc=r"""_leafs : vector<(tree_key_t)>""") + _sampled_leafs = property(_FFPopSim.rooted_tree__sampled_leafs_get, _FFPopSim.rooted_tree__sampled_leafs_set, doc=r"""_sampled_leafs : vector<(tree_key_t)>""") + root = property(_FFPopSim.rooted_tree_root_get, _FFPopSim.rooted_tree_root_set, doc=r"""root : tree_key_t""") + MRCA = property(_FFPopSim.rooted_tree_MRCA_get, _FFPopSim.rooted_tree_MRCA_set, doc=r"""MRCA : tree_key_t""") + + def __init__(self, *args, **kwargs): + r""" + Rooted phylogenetic tree. + + This class is used to represent the phylogenetic tree of a single locus. + It is possible to print the tree in Newick format, to get the subtree + spanned by some of the leaves, and to look at the tree nodes and edges. + + """ + _FFPopSim.rooted_tree_swiginit(self, _FFPopSim.new_rooted_tree(*args, **kwargs)) + __swig_destroy__ = _FFPopSim.delete_rooted_tree + external_branch_length = _swig_new_instance_method(_FFPopSim.rooted_tree_external_branch_length) + total_branch_length = _swig_new_instance_method(_FFPopSim.rooted_tree_total_branch_length) + calc_weight_distribution = _swig_new_instance_method(_FFPopSim.rooted_tree_calc_weight_distribution) + print_newick = _swig_new_instance_method(_FFPopSim.rooted_tree_print_newick) + print_sequences = _swig_new_instance_method(_FFPopSim.rooted_tree_print_sequences) + subtree_newick = _swig_new_instance_method(_FFPopSim.rooted_tree_subtree_newick) + print_weight_distribution = _swig_new_instance_method(_FFPopSim.rooted_tree_print_weight_distribution) + read_newick = _swig_new_instance_method(_FFPopSim.rooted_tree_read_newick) + get_sampled_leafs = _swig_new_instance_method(_FFPopSim.rooted_tree_get_sampled_leafs) + set_sampled_leafs = _swig_new_instance_method(_FFPopSim.rooted_tree_set_sampled_leafs) + __str__ = _swig_new_instance_method(_FFPopSim.rooted_tree___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.rooted_tree___repr__) + _ancestors_at_age = _swig_new_instance_method(_FFPopSim.rooted_tree__ancestors_at_age) + + def ancestors_at_age(self, age, subtree): + '''Find nodes in subtree younger than a certain age + + Parameters: + - age: critical age to check + - subtree: subtree to look for nodes in + + Returns: + - ancestors: the ancestors at that age + ''' + return list(self._ancestors_at_age(age, subtree)) + + create_subtree_from_keys = _swig_new_instance_method(_FFPopSim.rooted_tree_create_subtree_from_keys) + + @property + def edges(self): + '''Edges of the tree''' + return dict(self._edges) + + + @edges.setter + def edges(self, es): + self._edges = map_key_edge(es) + + + @property + def nodes(self): + '''Nodes of the tree''' + return dict(self._nodes) + + + @nodes.setter + def nodes(self, ns): + self._nodes = map_key_node(ns) + + + @property + def leafs(self): + '''Leaves of the tree''' + return list(self._leafs) + + + @leafs.setter + def leafs(self, leaves): + self._leafs = vector_tree_key(leaves) + + + @property + def sampled_leafs(self): + return list(self._sampled_leafs) + + + @leafs.setter + def sampled_leafs(self, leaves): + self._sampled_leafs = vector_tree_key(leaves) + + + def to_Biopython_tree(self): + '''Convert the tree into Biopython format + + Returns: + - tree: Biopython.Phylo phylogenetic tree representation of self + ''' + from io import StringIO + from Bio import Phylo + + treedata = self.print_newick() + handle = StringIO(treedata) + tree = Phylo.read(handle, "newick") + return tree + + +# Register rooted_tree in _FFPopSim: +_FFPopSim.rooted_tree_swigregister(rooted_tree) +class multi_locus_genealogy(object): + r"""Genealogy for multiple loci""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + r"""Default constructor""" + _FFPopSim.multi_locus_genealogy_swiginit(self, _FFPopSim.new_multi_locus_genealogy(*args, **kwargs)) + __swig_destroy__ = _FFPopSim.delete_multi_locus_genealogy + track_locus = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy_track_locus) + reset = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy_reset) + reset_but_loci = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy_reset_but_loci) + __str__ = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy___repr__) + _get_number_of_loci = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy__get_number_of_loci) + _get_loci = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy__get_loci) + + @property + def loci(self): + '''The loci that are being tracked''' + return self._get_loci(self._get_number_of_loci()) + + get_tree = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy_get_tree) + _set_tree = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy__set_tree) + _get_newGeneration = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy__get_newGeneration) + _set_newGeneration = _swig_new_instance_method(_FFPopSim.multi_locus_genealogy__set_newGeneration) + +# Register multi_locus_genealogy in _FFPopSim: +_FFPopSim.multi_locus_genealogy_swigregister(multi_locus_genealogy) +class haploid_highd(object): + r""" + Class for high-dimensional population genetics (genomes larger than ~20 loci). + + This class is the main object for simulating the evolution of populations with + many loci (more than ~20). The class offers a number of functions, but an + example will explain the basic idea:: + + ###################################### + # EXAMPLE SCRIPT FOR HAPLOID_HIGHD # + ###################################### + import numpy as np + import matplotlib.pyplot as plt + import FFPopSim as h + c = h.haploid_highd(300) # 300 loci + pop.set_wildtype(1000) # start with 1000 wildtype individuals + pop.mutation_rate = 1e-4 # mutation rate per site per generation + pop.outcrossing_rate = 1e-1 # probability of sexual reproduction per gen + pop.crossover_rate = 1e-2 # probability of crossover per site per gen + pop.evolve(100) # evolve for 100 generations + c.plot_divergence_histogram() + plt.show() + ###################################### + + Populations can have a number of phenotypic traits that contribute to the fitness + of each individual. The function that calculates fitness from the phenotype + identifies fitness with the first trait only by default. The user is, however, + free to subclass haploid_highd in C++ (as it is done in hivpopulation) and + implement their own phenotype -> fitness function. + + In addition, the trait landscapes describe the genotype -> phenotype maps. + These can be set directly from Python (since the genotypic space has a finite + number of elements). + + **Note**: fitness is not a phenotypic trait directly, but rather a function of *all* + phenotypic traits together. + + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + r""" + Construct a high-dimensional population with certain parameters. + + Parameters: + - L: number of loci + - rng_seed: seed for the random generator. If zero (default) pick a random number + - number_of_traits: number of phenotypic traits, defaults to one + - all_polymorphic: option to use an infinite-sites model tracking ancestral alleles + (only available with a single phenotypic trait and zero mutation rate) + + """ + _FFPopSim.haploid_highd_swiginit(self, _FFPopSim.new_haploid_highd(*args, **kwargs)) + __swig_destroy__ = _FFPopSim.delete_haploid_highd + carrying_capacity = property(_FFPopSim.haploid_highd_carrying_capacity_get, _FFPopSim.haploid_highd_carrying_capacity_set, doc=r"""current carrying capacity of the environment""") + outcrossing_rate = property(_FFPopSim.haploid_highd_outcrossing_rate_get, _FFPopSim.haploid_highd_outcrossing_rate_set, doc=r"""outcrossing rate (probability of sexual reproduction per generation)""") + crossover_rate = property(_FFPopSim.haploid_highd_crossover_rate_get, _FFPopSim.haploid_highd_crossover_rate_set, doc=r"""crossover rate (probability of crossover per site per generation)""") + recombination_model = property(_FFPopSim.haploid_highd_recombination_model_get, _FFPopSim.haploid_highd_recombination_model_set, doc=r""" + Model of recombination to use + + Available values: + - FFPopSim.FREE_RECOMBINATION: free reassortment of all loci between parents + - FFPopSim.CROSSOVERS: linear chromosome with crossover probability per locus + + """) + circular = property(_FFPopSim.haploid_highd_circular_get, _FFPopSim.haploid_highd_circular_set, doc=r"""is the genome circular?""") + growth_rate = property(_FFPopSim.haploid_highd_growth_rate_get, _FFPopSim.haploid_highd_growth_rate_set, doc=r""" + Growth rate + + This value is used to determine how fast a population converges to the + carrying capacity. + + This parameter must be set strictly larger than 1 (very slow growth) and not + too big to avoid population explosion. The default is 2, which means that a + freely expanding population (N << carrying capacity) approximately doubles in + size every generation. + + Note that when the population is shrinking, in order to avoid extinction, the + population decreases by ten times or so only. If you want a hard bottleneck, + use the bottleneck function. + + """) + all_polymorphic = property(_FFPopSim.haploid_highd_all_polymorphic_get, _FFPopSim.haploid_highd_all_polymorphic_set, doc=r"""All polymorphic?""") + _get_mutation_rate = _swig_new_instance_method(_FFPopSim.haploid_highd__get_mutation_rate) + _set_mutation_rate = _swig_new_instance_method(_FFPopSim.haploid_highd__set_mutation_rate) + get_all_polymorphic = _swig_new_instance_method(_FFPopSim.haploid_highd_get_all_polymorphic) + set_all_polymorphic = _swig_new_instance_method(_FFPopSim.haploid_highd_set_all_polymorphic) + _get_polymorphisms = _swig_new_instance_method(_FFPopSim.haploid_highd__get_polymorphisms) + _get_fixed_mutations = _swig_new_instance_method(_FFPopSim.haploid_highd__get_fixed_mutations) + _get_number_of_mutations = _swig_new_instance_method(_FFPopSim.haploid_highd__get_number_of_mutations) + + def set_allele_frequencies(self, *args, **kwargs): + r""" + Initialize the population according to the given allele frequencies in linkage equilibrium. + + Parameters: + - frequencies: an array of length L with all allele frequencies + - N: set the population size and, if still unset, the carrying + capacity to this value + + """ + + if len(args) and (len(args[0]) != self.L): + raise ValueError('Please input an L dimensional list of allele frequencies.') + + + val = _FFPopSim.haploid_highd_set_allele_frequencies(self, *args, **kwargs) + + self._nonempty_clones = _np.array(self._get_nonempty_clones()) + return None + + + return val + + + def set_wildtype(self, *args, **kwargs): + r""" + Initialize a population of wildtype individuals + + Parameters: + - N: the number of individuals + + .. note:: the carrying capacity is set to the same value if still unset. + + """ + val = _FFPopSim.haploid_highd_set_wildtype(self, *args, **kwargs) + + self._nonempty_clones = _np.array(self._get_nonempty_clones()) + return None + + + return val + + track_locus_genealogy = _swig_new_instance_method(_FFPopSim.haploid_highd_track_locus_genealogy) + + def add_genotype(self, *args, **kwargs): + r""" + Add new individuals to the population with certain genotypes + + Parameters: + - genotype: genotype to add to the population (Boolean list) + - n: number of new individuals carrying that genotype + + """ + val = _FFPopSim.haploid_highd_add_genotype(self, *args, **kwargs) + + self._nonempty_clones = _np.array(self._get_nonempty_clones()) + + + return val + + add_trait_coefficient = _swig_new_instance_method(_FFPopSim.haploid_highd_add_trait_coefficient) + clear_trait = _swig_new_instance_method(_FFPopSim.haploid_highd_clear_trait) + clear_traits = _swig_new_instance_method(_FFPopSim.haploid_highd_clear_traits) + set_random_trait_epistasis = _swig_new_instance_method(_FFPopSim.haploid_highd_set_random_trait_epistasis) + add_fitness_coefficient = _swig_new_instance_method(_FFPopSim.haploid_highd_add_fitness_coefficient) + clear_fitness = _swig_new_instance_method(_FFPopSim.haploid_highd_clear_fitness) + set_random_epistasis = _swig_new_instance_method(_FFPopSim.haploid_highd_set_random_epistasis) + + def evolve(self, *args, **kwargs): + r""" + Evolve for some generations. + + Parameters: + - gen: number of generations, defaults to one + + """ + val = _FFPopSim.haploid_highd_evolve(self, *args, **kwargs) + + self.calc_stat() + self._nonempty_clones = _np.array(self._get_nonempty_clones()) + return None + + + return val + + + def bottleneck(self, *args, **kwargs): + r""" + Make the population undergo a bottleneck + + Parameters: + - size_of_bottleneck: the number of individuals at the bottleneck + + """ + val = _FFPopSim.haploid_highd_bottleneck(self, *args, **kwargs) + + self.calc_stat() + self._nonempty_clones = _np.array(self._get_nonempty_clones()) + return None + + + return val + + flip_single_locus = _swig_new_instance_method(_FFPopSim.haploid_highd_flip_single_locus) + calc_stat = _swig_new_instance_method(_FFPopSim.haploid_highd_calc_stat) + + def unique_clones(self, *args, **kwargs): + r""" + Recompress the clone structure + + During its evolution, identical clones might be generated by different routes at + different times. This function merges any such duplicates into unique clones with + the size equal to the sum of the sizes of the duplicates. + + """ + val = _FFPopSim.haploid_highd_unique_clones(self, *args, **kwargs) + + self._nonempty_clones = self._get_nonempty_clones() + + + return val + + _get_nonempty_clones = _swig_new_instance_method(_FFPopSim.haploid_highd__get_nonempty_clones) + + def random_clone(self, *args, **kwargs): + r""" + Get a random clone + + Returns: + - clone: index of the random clone + + """ + val = _FFPopSim.haploid_highd_random_clone(self, *args, **kwargs) + + val = (self._nonempty_clones == val).nonzero()[0][0] + + + return val + + get_diversity_statistics = _swig_new_instance_method(_FFPopSim.haploid_highd_get_diversity_statistics) + get_divergence_statistics = _swig_new_instance_method(_FFPopSim.haploid_highd_get_divergence_statistics) + get_allele_frequency = _swig_new_instance_method(_FFPopSim.haploid_highd_get_allele_frequency) + get_derived_allele_frequency = _swig_new_instance_method(_FFPopSim.haploid_highd_get_derived_allele_frequency) + get_ancestral_state = _swig_new_instance_method(_FFPopSim.haploid_highd_get_ancestral_state) + get_pair_frequency = _swig_new_instance_method(_FFPopSim.haploid_highd_get_pair_frequency) + get_chi = _swig_new_instance_method(_FFPopSim.haploid_highd_get_chi) + get_derived_chi = _swig_new_instance_method(_FFPopSim.haploid_highd_get_derived_chi) + get_chi2 = _swig_new_instance_method(_FFPopSim.haploid_highd_get_chi2) + get_LD = _swig_new_instance_method(_FFPopSim.haploid_highd_get_LD) + get_moment = _swig_new_instance_method(_FFPopSim.haploid_highd_get_moment) + get_trait_weight = _swig_new_instance_method(_FFPopSim.haploid_highd_get_trait_weight) + + def get_fitness(self, *args, **kwargs): + r""" + Get the fitness of an individual + + Parameters: + - n: index of the clone whose fitness is to be computed + + Returns: + - fitness: fitness value of that clone + + """ + + if len(args) and (args[0] >= self.number_of_clones): + raise ValueError('The population has only '+str(self.number_of_clones)+' clones.') + if len(args): + args = list(args) + args[0] = self._nonempty_clones[args[0]] + args = tuple(args) + + + return _FFPopSim.haploid_highd_get_fitness(self, *args, **kwargs) + + + def get_clone_size(self, *args, **kwargs): + r""" + Get the size of a clone + + Parameters: + - n: index of the clone + + Returns: + - size: size of the selected clone + + """ + + if len(args) and (args[0] >= self.number_of_clones): + raise ValueError('The population has only '+str(self.number_of_clones)+' clones.') + if len(args): + args = list(args) + args[0] = self._nonempty_clones[args[0]] + args = tuple(args) + + + return _FFPopSim.haploid_highd_get_clone_size(self, *args, **kwargs) + + + def get_trait(self, *args, **kwargs): + r""" + Get a trait of an individual + + Parameters: + - n: index of the clone whose trait is to be computed + - t: trait to be computed + + Returns: + - trait: value of that trait for that clone + + """ + + if (len(args) > 1) and (args[1] >= self.number_of_traits): + raise ValueError("There are only "+str(self.number_of_traits)+" traits.") + if len(args) and (args[0] >= self.number_of_clones): + raise ValueError('The population has only '+str(self.number_of_clones)+' clones.') + if len(args): + args = list(args) + args[0] = self._nonempty_clones[args[0]] + args = tuple(args) + + + return _FFPopSim.haploid_highd_get_trait(self, *args, **kwargs) + + get_trait_epistasis = _swig_new_instance_method(_FFPopSim.haploid_highd_get_trait_epistasis) + get_fitness_statistics = _swig_new_instance_method(_FFPopSim.haploid_highd_get_fitness_statistics) + get_trait_statistics = _swig_new_instance_method(_FFPopSim.haploid_highd_get_trait_statistics) + get_trait_covariance = _swig_new_instance_method(_FFPopSim.haploid_highd_get_trait_covariance) + _update_traits = _swig_new_instance_method(_FFPopSim.haploid_highd__update_traits) + _update_fitness = _swig_new_instance_method(_FFPopSim.haploid_highd__update_fitness) + tree_sample = property(_FFPopSim.haploid_highd_tree_sample_get, _FFPopSim.haploid_highd_tree_sample_set, doc=r"""tree_sample : int""") + __str__ = _swig_new_instance_method(_FFPopSim.haploid_highd___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.haploid_highd___repr__) + + @property + def mutation_rate(self): + '''mutation rate (per site per generation)''' + return self._get_mutation_rate() + + @mutation_rate.setter + def mutation_rate(self, m): + if self.all_polymorphic and m != 0: + raise ValueError("You cannot set all_polymorphic and a nonzero mutation rate.") + else: + self._set_mutation_rate(m) + + get_clone = _swig_new_instance_method(_FFPopSim.haploid_highd_get_clone) + L = property(_FFPopSim.haploid_highd_L_get, doc=r"""Number of loci (read-only)""") + number_of_loci = property(_FFPopSim.haploid_highd_number_of_loci_get, doc=r"""Number of loci (read-only)""") + N = property(_FFPopSim.haploid_highd_N_get, doc=r"""Population size (read-only)""") + population_size = property(_FFPopSim.haploid_highd_population_size_get, doc=r"""Population size (read-only)""") + generation = property(_FFPopSim.haploid_highd_generation_get, _FFPopSim.haploid_highd_generation_set, doc=r"""Current generation (read-only)""") + number_of_clones = property(_FFPopSim.haploid_highd_number_of_clones_get, doc=r"""Number of non-empty clones (read-only)""") + number_of_traits = property(_FFPopSim.haploid_highd_number_of_traits_get, doc=r"""Number of traits (read-only)""") + max_fitness = property(_FFPopSim.haploid_highd_max_fitness_get, doc=r"""Maximal fitness in the population (read-only)""") + participation_ratio = property(_FFPopSim.haploid_highd_participation_ratio_get, doc=r"""Participation ratio (read-only)""") + + @property + def polymorphisms(self): + '''Polymorphisms from all_polymorphic (read-only)''' + if not self.all_polymorphic: + raise ValueError("all_polymorphic is not set.") + return self._get_polymorphisms() + + + @property + def fixed_mutations(self): + '''Fixed mutations from all_polymorphic (read-only)''' + if not self.all_polymorphic: + raise ValueError("all_polymorphic is not set.") + return self._get_fixed_mutations() + + + @property + def number_of_mutations(self): + '''Fixed mutations from all_polymorphic (read-only)''' + if not self.all_polymorphic: + raise ValueError("all_polymorphic is not set.") + return self._get_number_of_mutations() + + + def _set_trait_weights(self, *args, **kwargs): + r"""_set_trait_weights(haploid_highd self, double * IN_ARRAY1)""" + + if len(args) and (len(args[0]) != self.number_of_traits): + raise ValueError('The weights must be a sequence of length equal to the number of traits.') + + + return _FFPopSim.haploid_highd__set_trait_weights(self, *args, **kwargs) + + + def _get_trait_weights(self, *args, **kwargs): + r""" + weight of each trait on fitness + + .. note:: Fitness is updated automatically when the weights are changed. + + """ + + args = tuple(list(args) + [self.number_of_traits]) + + + return _FFPopSim.haploid_highd__get_trait_weights(self, *args, **kwargs) + + + trait_weights = property(_get_trait_weights, _set_trait_weights) + + + def dump(self, filename, format='bz2', include_genealogy=False): + '''Dump a population to binary file, for later use. + + Parameters: + - filename: the path to the file where to store the information + - format: one of 'bz2' or 'plain'. Choose the former if you want compression. + - include_genealogy: if True, the multi_locus_genealogy is stored as well (if present). + + .. note:: The population can be reloaded using the function FFPopSim.load_haploid_highd. + ''' + + try: + import cPickle as pickle + except: + import pickle + + pop_dict = {} + pop_dict['genotypes'] = self.get_genotypes() + pop_dict['N'] = self.carrying_capacity + pop_dict['L'] = self.L + pop_dict['mu'] = self.mutation_rate + pop_dict['crossover_rate'] = self.crossover_rate + pop_dict['outcrossing_rate'] = self.outcrossing_rate + pop_dict['circular'] = self.circular + pop_dict['generation'] = self.generation + pop_dict['clone_sizes'] = self.get_clone_sizes() + pop_dict['recombination_model'] = self.recombination_model + pop_dict['traits_additive'] = [self.get_trait_additive(i) for i in range(self.number_of_traits)] + pop_dict['traits_epistasis'] = [self.get_trait_epistasis(i) for i in range(self.number_of_traits)] + pop_dict['all_polymorphic'] = self.all_polymorphic + pop_dict['ancestral'] = self.get_ancestral_states() + pop_dict['trait_weights'] = self.trait_weights + + # Genealogy + if include_genealogy and len(self.genealogy.loci): + pop_dict['trees'] = {locus: self.genealogy.get_tree(locus).print_newick() for locus in self.genealogy.loci} + pop_dict['_nonempty_clones'] = self._nonempty_clones + + # Save newGenerations as a non-SWIG object + def serialize_leaf(leaf): + serial = {} + for key in ['clone_size', 'crossover', 'fitness', 'number_of_offspring']: + serial[key] = getattr(leaf, key) + serial['own_key'] = (leaf.own_key.index, leaf.own_key.age) + serial['parent_node'] = (leaf.parent_node.index, leaf.parent_node.age) + return serial + + newGenerations = [] + for locus in self.genealogy.loci: + newGenerations.append(map(serialize_leaf, self.genealogy._get_newGeneration(locus))) + pop_dict['_newGenerations'] = newGenerations + + + with open(filename, 'wb') as f: + dump = pickle.dumps(pop_dict, pickle.HIGHEST_PROTOCOL) + + # Try to compress if the user wishes so + try: + if format == 'bz2': + import bz2 + dump = dump.encode('bz2') + # Fallback on uncompressed + except: + import warnings + warnings.warn('compression module ('+format+') not found. Defaulting to uncompressed file.') + format = 'plain' + + # Dump to file + f.write(dump) + + + def copy(self, rng_seed=0): + '''Copy population into new instance. + + Parameters: + - rng_seed: random number to initialize the new population + ''' + pop = haploid_highd(self.L, rng_seed=rng_seed, number_of_traits=self.number_of_traits) + + # Mutation and recombination + pop.recombination_model = self.recombination_model + pop.outcrossing_rate = self.outcrossing_rate + pop.crossover_rate = self.crossover_rate + pop.mutation_rate = self.mutation_rate + pop.circular = self.circular + + # Fitness + for i in range(self.number_of_traits): + pop.set_trait_additive(self.get_trait_additive(i), i) + for coeff in self.get_trait_epistasis(i): + pop.add_trait_coefficient(coeff[0], coeff[1], i) + + # Population parameters + pop.carrying_capacity = self.carrying_capacity + pop.set_genotypes(self.get_genotypes(), self.get_clone_sizes()) + + # Evolution + pop.generation = self.generation + + return pop + + + def status(self): + '''Print a status list of the population parameters''' + parameters = (('number of loci', 'L'), + ('circular', 'circular'), + ('number of traits', 'number_of_traits'), + ('population size', 'N'), + ('carrying capacity', 'carrying_capacity'), + ('generation', 'generation'), + ('outcrossing rate', 'outcrossing_rate'), + ('crossover rate', 'crossover_rate'), + ('recombination model', 'recombination_model'), + ('mutation rate', 'mutation_rate'), + ('participation ratio', 'participation_ratio'), + ('number of non-empty clones', 'number_of_clones'), + ) + lenmax = max(map(lambda x: len(x[0]), parameters)) + + for (strin, name) in parameters: + par = getattr(self, name) + # Recombination model needs a conversion + # (a very frequently used one, to be honest) + if strin == 'recombination model': + if par == 0: + par = 'FREE_RECOMBINATION' + else: + par = 'CROSSOVERS' + print(('{:<'+str(lenmax + 2)+'s}').format(strin)+'\t'+str(par)) + + + def set_genotypes(self, *args, **kwargs): + r""" + Initialize population with fixed counts for specific genotypes. + + Parameters: + - genotypes: list of genotypes to set. Genotypes are lists of alleles, + e.g. [[0,0,1,0], [0,1,1,1]] for genotypes 0010 and 0111 + - counts: list of the number at which each of those genotypes it to be present + + .. note:: the population size and, if unset, the carrying capacity will be set + as the sum of the counts. + + **Example**: if you want to initialize 200 individuals with genotype 001 and + 300 individuals with genotype 110, you can use + ``set_genotypes([[0,0,1], [1,1,0]], [200, 300])`` + + """ + + if len(args) and (len(args) >= 2): + genotypes = args[0] + counts = args[1] + genotypes = _np.array(genotypes, float, copy=False, ndmin=2) + counts = _np.asarray(counts, float) + if len(genotypes) != len(counts): + raise ValueError('Genotypes and counts must have the same length') + args = tuple([genotypes.ravel(), counts] + list(args[2:])) + + + val = _FFPopSim.haploid_highd_set_genotypes(self, *args, **kwargs) + + self._nonempty_clones = _np.array(self._get_nonempty_clones()) + return None + + + return val + + + def set_genotypes_and_ancestral_state(self, *args, **kwargs): + r""" + Initialize population with fixed counts for specific genotypes. + + Parameters: + - genotypes: list of genotypes to set. Genotypes are lists of alleles, + e.g. [[0,0,1,0], [0,1,1,1]] for genotypes 0010 and 0111 + - counts: list of the number at which each of those genotypes it to be present + - ancestral state of the sample, a vector of 0 and 1 + .. note:: the population size and, if unset, the carrying capacity will be set + as the sum of the counts. + + **Example**: if you want to initialize 200 individuals with genotype 001 and + 300 individuals with genotype 110, you can use + ``set_genotypes([[0,0,1], [1,1,0]], [200, 300])`` + + """ + + if len(args) and (len(args) >= 3): + genotypes = args[0] + counts = args[1] + anc_state = args[2] + genotypes = _np.array(genotypes, float, copy=False, ndmin=2) + counts = _np.asarray(counts, float) + anc_state = _np.asarray(anc_state, float) + if len(genotypes) != len(counts): + raise ValueError('Genotypes and counts must have the same length') + if (len(anc_state) != self.L): + raise ValueError('Ancestral state vector must have length L') + args = tuple([genotypes.ravel(), counts] + list(args[2:])) + + + val = _FFPopSim.haploid_highd_set_genotypes_and_ancestral_state(self, *args, **kwargs) + + self._nonempty_clones = _np.array(self._get_nonempty_clones()) + return None + + + return val + + _get_genealogy = _swig_new_instance_method(_FFPopSim.haploid_highd__get_genealogy) + + genealogy = property(_get_genealogy) + + + def get_allele_frequencies(self, *args, **kwargs): + r"""Get all allele frequencies""" + + args = tuple(list(args) + [self.L]) + + + return _FFPopSim.haploid_highd_get_allele_frequencies(self, *args, **kwargs) + + + def get_derived_allele_frequencies(self, *args, **kwargs): + r"""Get all derived allele frequencies""" + + args = tuple(list(args) + [self.L]) + + + return _FFPopSim.haploid_highd_get_derived_allele_frequencies(self, *args, **kwargs) + + + def get_ancestral_states(self, *args, **kwargs): + r"""Get ancestral state of all loci""" + + args = tuple(list(args) + [self.L]) + + + return _FFPopSim.haploid_highd_get_ancestral_states(self, *args, **kwargs) + + + def get_trait_additive(self, *args, **kwargs): + r""" + Get an array with the additive coefficients of all loci of a trait. + + Parameters: + - t: number of the trait + + Returns: + - coefficients: array of additive coefficients for the selected trait + + """ + + if (len(args) > 1) and (args[1] >= self.number_of_traits): + raise ValueError("There are only "+str(self.number_of_traits)+" traits.") + args = tuple([self.L] + list(args)) + + + return _FFPopSim.haploid_highd_get_trait_additive(self, *args, **kwargs) + + + def set_trait_additive(self, *args, **kwargs): + r""" + Set the additive part of a trait + + Parameters: + - coefficients: array of coefficients for the trait (of length L). All previous additive coefficents are erased + - t: number of the trait to set + + """ + + if (len(args) > 1) and (args[1] >= self.number_of_traits): + raise ValueError("There are only "+str(self.number_of_traits)+" traits.") + if len(args) and (len(args[0]) != self.L): + raise ValueError("L coefficients expected.") + + + return _FFPopSim.haploid_highd_set_trait_additive(self, *args, **kwargs) + + + def set_fitness_additive(self, *args, **kwargs): + r"""Shortcut for set_trait_additive when there is only one trait""" + + if len(args) and (len(args[0]) != self.L): + raise ValueError("L coefficients expected.") + + + return _FFPopSim.haploid_highd_set_fitness_additive(self, *args, **kwargs) + + + def get_fitnesses(self): + '''Get the fitness of all clones.''' + f = _np.zeros(self.number_of_clones) + for i in range(self.number_of_clones): + f[i] = self.get_fitness(i) + return f + + + def get_traits(self): + '''Get all traits from all clones''' + t = _np.zeros((self.number_of_clones, self.number_of_traits)) + for i in range(self.number_of_clones): + for j in range(self.number_of_traits): + t[i, j] = self.get_trait(i, j) + return t + + + def get_clone_sizes(self): + '''Get the size of all clones.''' + s = _np.zeros(self.number_of_clones, int) + for i in range(self.number_of_clones): + s[i] = self.get_clone_size(i) + return s + + + def get_genotype(self, *args, **kwargs): + r"""get_genotype(haploid_highd self, int n) -> boost::dynamic_bitset< >""" + + if len(args) and (args[0] >= self.number_of_clones): + raise ValueError('The population has only '+str(self.number_of_clones)+' clones.') + if len(args): + args = list(args) + args[0] = self._nonempty_clones[args[0]] + args = tuple(args) + + + return _FFPopSim.haploid_highd_get_genotype(self, *args, **kwargs) + + + def get_genotypes(self): + '''Get all genotypes of the population. + + Return: + - genotypes: boolean 2D array with the genotypes + + .. note:: this function does not return the sizes of each clone. + ''' + genotypes = _np.zeros((self.number_of_clones, self.number_of_loci), bool) + for i in range(self.number_of_clones): + genotypes[i] = self.get_genotype(i) + return genotypes + + + def distance_Hamming(self, clone_gt1, clone_gt2, chunks=None, every=1): + '''Calculate the Hamming distance between two genotypes + + Parameters: + - clone_gt1: index of the clone corresponding to the first genotype + - clone_gt2: index of the clone corresponding to the second genotype + - chunks: list of pairs delimiting the genetic areas to include + - every: do the comparison only on certain sites + + **Example**: to calculate the distance between the first two clones + limited to third codon positions between locus 90 and 200, use: + ``distance_Hamming(0, 1, chunks=[92, 200], every=3)``. + ''' + if _np.isscalar(clone_gt1): + genotypes = self.get_genotypes((clone_gt1, clone_gt2)) + clone_gt1 = genotypes[0] + clone_gt2 = genotypes[1] + + if chunks is not None: + ind = _np.zeros(clones.shape[1], bool) + for chunk in chunks: + inde = _np.arange(chunk[1] - chunk[0]) + inde = inde[(inde % every) == 0] + chunk[0] + ind[inde] = True + clone_gt1 = clone_gt1[ind] + clone_gt2 = clone_gt2[ind] + return (clone_gt1 != clone_gt2).sum() + + + def random_genomes(self, n): + '''Get a sample of random genomes from the population + + Parameters: + - n: number of random genomes to compute + + Returns: + - gts: (n x L) bool matrix with the n genotypes + ''' + + L = self.number_of_loci + genotypes = _np.zeros((n, L), bool) + for i in range(genotypes.shape[0]): + genotypes[i] = self.get_genotype(self.random_clone()) + return genotypes + + + def random_clones(self, n): + '''Get random clones + + Parameters: + - n: number of random clones to return + + Returns: + - clones: clone indices + ''' + return _np.array([self.random_clone() for i in range(n)], int) + + + def get_fitness_histogram(self, n_sample=1000, **kwargs): + '''Calculate the fitness histogram of a population sample. + + Parameters: + - n_sample: number of individuals to sample + + Returns: + - h: numpy.histogram of fitness in the population + ''' + + fit = [self.get_fitness(self.random_clone()) for i in range(n_sample)] + h = _np.histogram(fit, **kwargs) + return h + + + def plot_fitness_histogram(self, axis=None, n_sample=1000, **kwargs): + '''Plot a distribution of fitness of a population sample. + + Parameters: + - axis: an axis to use. A new figure is created by default + - n_sample: number of individuals to sample + - kwargs: further optional keyword arguments to matplotlib.pyplot.hist + + Returns: + - return value of axis.hist(...) + ''' + + import matplotlib.pyplot as plt + fit = [self.get_fitness(self.random_clone()) for i in range(n_sample)] + + if axis is None: + fig = plt.figure() + axis = fig.add_subplot(111) + axis.set_title('Fitness histogram') + axis.set_xlabel('Fitness') + return axis.hist(fit, **kwargs) + + + def get_divergence_histogram(self, bins=10, chunks=None, every=1, n_sample=1000, **kwargs): + '''Get the divergence histogram restricted to those chunks of the genome. + + Parameters: + - bins: number or array of bins to be used in the histogram (see also numpy.histogram) + - chunks: restrict analysis to some chunk in the genome. It must be an n x 2 matrix with + the initial and (final+1) positions of the chunks + - every: restrict analysis to every X positions. For instance, if every third site is neutral, + this argument can be used to only look at those neutral sites + - n_sample: number of individuals to sample + - kwargs: further optional keyword arguments to numpy.histogram + + Returns: + - h: numpy.histogram of divergence in the population + ''' + + # Check chunks + if chunks is not None: + chunks = _np.asarray(chunks) + if (_np.rank(chunks) != 2) or (chunks.shape[1] != 2): + raise ValueError('Please input an N x 2 matrix with the chunks initial and (final+1) positions') + + # Get the random genotypes + genotypes = self.random_genomes(n_sample) + + # Restrict to the chunks + if chunks is not None: + ind = _np.zeros(genotypes.shape[1], bool) + for chunk in chunks: + inde = _np.arange(chunk[1] - chunk[0]) + inde = inde[(inde % every) == 0] + chunk[0] + ind[inde] = True + genotypes = genotypes[:,ind] + + # Calculate divergence + div = genotypes.sum(axis=1) + + # Calculate histogram + return _np.histogram(div, bins=bins, **kwargs) + + + def plot_divergence_histogram(self, axis=None, n_sample=1000, **kwargs): + '''Plot the divergence histogram of a population sample. + + Parameters: + - axis: an axis to use. A new figure is created by default + - n_sample: number of individuals to sample + - kwargs: further optional keyword arguments to matplotlib.pyplot.hist + + Returns: + - return value of axis.hist(...) + ''' + + import matplotlib.pyplot as plt + genotypes = self.random_genomes(n_sample) + div = genotypes.sum(axis=1) + + if axis is None: + fig = plt.figure() + axis = fig.add_subplot(111) + axis.set_title('Divergence histogram') + axis.set_xlabel('Divergence') + + if 'bins' not in kwargs: + kwargs['bins'] = _np.arange(10) * max(1, (div.max() + 1 - div.min()) / 10) + div.min() + return axis.hist(div, **kwargs) + + + def get_diversity_histogram(self, bins=10, chunks=None, every=1, n_sample=1000, **kwargs): + '''Get the diversity histogram restricted to those chunks of the genome. + + Parameters: + - bins: number or array of bins to be used in the histogram (see also numpy.histogram) + - chunks: restrict analysis to some chunk in the genome. It must be an n x 2 matrix with + the initial and (final+1) positions of the chunks + - every: restrict analysis to every X positions. For instance, if every third site is neutral, + this argument can be used to only look at those neutral sites + - n_sample: number of individuals to sample + - kwargs: further optional keyword arguments to numpy.histogram + + Returns: + - h: numpy.histogram of diversity in the population + ''' + + # Check chunks + if chunks is not None: + chunks = _np.asarray(chunks) + if (_np.rank(chunks) != 2) or (chunks.shape[1] != 2): + raise ValueError('Please input an N x 2 matrix with the chunks initial and (final+1) positions') + + # Get the random genotypes + genotypes = self.random_genomes(2 * n_sample) + + # Restrict to the chunks + if chunks is not None: + ind = _np.zeros(genotypes.shape[1], bool) + for chunk in chunks: + inde = _np.arange(chunk[1] - chunk[0]) + inde = inde[(inde % every) == 0] + chunk[0] + ind[inde] = True + genotypes = genotypes[:,ind] + + # Calculate diversity + genotypes1 = genotypes[:genotypes.shape[0] / 2] + genotypes2 = genotypes[-genotypes1.shape[0]:] + div = (genotypes1 != genotypes2).sum(axis=1) + + # Calculate histogram + return _np.histogram(div, bins=bins, **kwargs) + + + def plot_diversity_histogram(self, axis=None, n_sample=1000, **kwargs): + '''Plot the diversity histogram of a population sample. + + Parameters: + - axis: an axis to use. A new figure is created by default + - n_sample: number of individuals to sample + - kwargs: further optional keyword arguments to matplotlib.pyplot.hist + + Returns: + - return value of axis.hist(...) + ''' + + import matplotlib.pyplot as plt + genotypes1 = self.random_genomes(n_sample) + genotypes2 = self.random_genomes(n_sample) + div = (genotypes1 != genotypes2).sum(axis=1) + + if axis is None: + fig = plt.figure() + axis = fig.add_subplot(111) + axis.set_title('Diversity histogram') + axis.set_xlabel('Diversity') + + if 'bins' not in kwargs: + kwargs['bins'] = _np.arange(10) * max(1, (div.max() + 1 - div.min()) / 10) + div.min() + return axis.hist(div, **kwargs) + + _set_tree_in_genealogy = _swig_new_instance_method(_FFPopSim.haploid_highd__set_tree_in_genealogy) + _set_newGeneration_in_genealogy = _swig_new_instance_method(_FFPopSim.haploid_highd__set_newGeneration_in_genealogy) + +# Register haploid_highd in _FFPopSim: +_FFPopSim.haploid_highd_swigregister(haploid_highd) +HIVPOP_VERBOSE = _FFPopSim.HIVPOP_VERBOSE + +HIVPOP_BADARG = _FFPopSim.HIVPOP_BADARG + +NOTHING = _FFPopSim.NOTHING + +HIVGENOME = _FFPopSim.HIVGENOME + +GAG_START = _FFPopSim.GAG_START + +GAG_END = _FFPopSim.GAG_END + +POL_START = _FFPopSim.POL_START + +POL_END = _FFPopSim.POL_END + +ENV_START = _FFPopSim.ENV_START + +ENV_END = _FFPopSim.ENV_END + +NEF_START = _FFPopSim.NEF_START + +NEF_END = _FFPopSim.NEF_END + +VIF_START = _FFPopSim.VIF_START + +VIF_END = _FFPopSim.VIF_END + +VPR_START = _FFPopSim.VPR_START + +VPR_END = _FFPopSim.VPR_END + +VPU_START = _FFPopSim.VPU_START + +VPU_END = _FFPopSim.VPU_END + +REV1_START = _FFPopSim.REV1_START + +REV1_END = _FFPopSim.REV1_END + +REV2_START = _FFPopSim.REV2_START + +REV2_END = _FFPopSim.REV2_END + +TAT1_START = _FFPopSim.TAT1_START + +TAT1_END = _FFPopSim.TAT1_END + +TAT2_START = _FFPopSim.TAT2_START + +TAT2_END = _FFPopSim.TAT2_END + +class hivgene(object): + r"""Structure for an HIV gene.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + start = property(_FFPopSim.hivgene_start_get, _FFPopSim.hivgene_start_set, doc=r"""Initial position of the gene""") + end = property(_FFPopSim.hivgene_end_get, _FFPopSim.hivgene_end_set, doc=r"""Final position of the gene""") + second_start = property(_FFPopSim.hivgene_second_start_get, _FFPopSim.hivgene_second_start_set, doc=r"""second_start : unsigned int""") + second_end = property(_FFPopSim.hivgene_second_end_get, _FFPopSim.hivgene_second_end_set, doc=r"""second_end : unsigned int""") + + def __init__(self, *args, **kwargs): + r"""Structure for an HIV gene.""" + _FFPopSim.hivgene_swiginit(self, _FFPopSim.new_hivgene(*args, **kwargs)) + __str__ = _swig_new_instance_method(_FFPopSim.hivgene___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.hivgene___repr__) + __swig_destroy__ = _FFPopSim.delete_hivgene + +# Register hivgene in _FFPopSim: +_FFPopSim.hivgene_swigregister(hivgene) +class hivpopulation(haploid_highd): + r""" + Class for HIV population genetics (genome size = 10000). + + This class is the main object for simulating the evolution of HIV. + The class offers a number of functions, but an example will explain the basic + idea:: + + ##################################### + # EXAMPLE SCRIPT # + ##################################### + import numpy as np + import matplotlib.pyplot as plt + import FFPopSim as h + + c = h.hivpopulation(2000) # Create a population of 2000 individuals + c.evolve(100) # Evolve (neutrally) for 100 generations + c.plot_divergence_histogram() + plt.show() + ##################################### + + **This class is a subclass of haploid_high and offers most of its methods.** + In addition to the haploid_highd class, this class offers functions for reading + fitness and drug resistance landscapes from a text file, and to save genomes as + plain text or in compressed NumPy format. + + Moreover, there are two phenotypic traits, replication and resistance. Their + relative importance for viral fitness is set by the ``treatment`` attribute:: + + f[trait] = trait[0] + treatment * trait[1] + + By default, ``treatment`` is set to zero, to simulate non-treated patients. + + The gene structure of HIV is modelled roughly, including only start/end positions + for the exons, using HXB2 as a reference. Different genes do not get automatically + different fitness landscapes. + + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + r""" + Construct a HIV population with certain parameters. + + Parameters: + + - N number of viral particles + - rng_seed seed for the random number generator. If this is 0, time(NULL)+getpid() is used. + - mutation_rate mutation rate in events / generation / site + - coinfection_rate probability of coinfection of the same cell by two viral particles in events / generation + - crossover_rate probability of template switching during coinfection in events / site + + .. note:: the genome length is 10000 (see HIVGENOME). + + """ + _FFPopSim.hivpopulation_swiginit(self, _FFPopSim.new_hivpopulation(*args, **kwargs)) + __swig_destroy__ = _FFPopSim.delete_hivpopulation + gag = property(_FFPopSim.hivpopulation_gag_get, _FFPopSim.hivpopulation_gag_set, doc=r"""gag : hivgene""") + pol = property(_FFPopSim.hivpopulation_pol_get, _FFPopSim.hivpopulation_pol_set, doc=r"""pol : hivgene""") + env = property(_FFPopSim.hivpopulation_env_get, _FFPopSim.hivpopulation_env_set, doc=r"""env : hivgene""") + nef = property(_FFPopSim.hivpopulation_nef_get, _FFPopSim.hivpopulation_nef_set, doc=r"""nef : hivgene""") + vif = property(_FFPopSim.hivpopulation_vif_get, _FFPopSim.hivpopulation_vif_set, doc=r"""vif : hivgene""") + vpu = property(_FFPopSim.hivpopulation_vpu_get, _FFPopSim.hivpopulation_vpu_set, doc=r"""vpu : hivgene""") + vpr = property(_FFPopSim.hivpopulation_vpr_get, _FFPopSim.hivpopulation_vpr_set, doc=r"""vpr : hivgene""") + tat = property(_FFPopSim.hivpopulation_tat_get, _FFPopSim.hivpopulation_tat_set, doc=r"""tat : hivgene""") + rev = property(_FFPopSim.hivpopulation_rev_get, _FFPopSim.hivpopulation_rev_set, doc=r"""rev : hivgene""") + read_replication_coefficients = _swig_new_instance_method(_FFPopSim.hivpopulation_read_replication_coefficients) + read_resistance_coefficients = _swig_new_instance_method(_FFPopSim.hivpopulation_read_resistance_coefficients) + write_genotypes = _swig_new_instance_method(_FFPopSim.hivpopulation_write_genotypes) + __str__ = _swig_new_instance_method(_FFPopSim.hivpopulation___str__) + __repr__ = _swig_new_instance_method(_FFPopSim.hivpopulation___repr__) + + def copy(self, rng_seed=0): + '''Copy population into new instance. + + Parameters: + - rng_seed: random number to initialize the new population + ''' + pop = hivpopulation(self.N, + rng_seed=rng_seed, + mutation_rate=self.mutation_rate, + coinfection_rate=self.outcrossing_rate, + crossover_rate=self.crossover_rate) + + # Fitness + for i in range(self.number_of_traits): + pop.set_trait_additive(self.get_trait_additive(i), i) + for coeff in self.get_trait_epistasis(i): + pop.add_trait_coefficient(coeff[0], coeff[1], i) + + # Population parameters + pop.carrying_capacity = self.carrying_capacity + pop.set_genotypes(self.get_genotypes(), self.get_clone_sizes()) + + # Evolution + pop._set_generation(self.generation) + + return pop + + treatment = property(_FFPopSim.hivpopulation_treatment_get, _FFPopSim.hivpopulation_treatment_set, doc=r""" + Treatment weight (between 0 and 1) + + .. note:: this variable controls how important is either of the two phenotypic + traits, replication and resistance. Their contribution to fitness is + always linear (in this implementation). + + """) + + def write_genotypes_compressed(self, filename, sample_size, gt_label='', start=0, length=0): + '''Store random genotypes into a compressed file. + + Parameters: + - filename: string with the name of the file to store the genotype into + - sample_size: how many random genotypes to store + - gt_label: common fasta label for the genotypes (e.g. "HIV-sim") + - start: if only a portion of the genome is to be stored, start from this position + - length: store a chunk from ``start`` to this length + + The genotypes can be read using numpy.load. + ''' + + import numpy as np + L = self.number_of_loci + if length <= 0: + length = L - start + d = {} + for i in range(sample_size): + rcl = self.random_clone() + d['>'+str(i)+'_GT-'+gt_label+'_'+str(rcl)] = self.get_genotype(rcl)[start:start+length] + np.savez_compressed(filename, **d) + + + def set_trait_landscape(self, + traitnumber=0, + lethal_fraction=0.05, + deleterious_fraction=0.8, + adaptive_fraction=0.01, + effect_size_lethal=0.8, + effect_size_deleterious=0.1, + effect_size_adaptive=0.01, + env_fraction=0.1, + effect_size_env=0.01, + number_epitopes=0, + epitope_strength=0.05, + number_valleys=0, + valley_strength=0.1, + ): + '''Set HIV trait landscape according to some general parameters. + + Parameters: + - lethal_fraction: fraction of lethal sites + - deleterious_fraction: fraction of deleterious sites + - adaptive_fraction: fraction of beneficial sites + - effect_size_lethal: effect of lethal changes + - effect_size_deleterious: average effect of deleterious changes + - effect_size_adaptive: average effect of beneficial changes + + - env_fraction: fraction of beneficial sites in env + - effect_size_env: average effect of beneficial changes in env + - number_epitopes: number of (epistatic) epitopes + - epitope_strength: average height of an epitope escape mutation + - number_valleys: number of (epistatic) valleys + - valley_strength: average depth of a valley + + .. note:: the effects of deleterious and beneficial sites are exponentially + distributed, i.e. most of them will still be almost neutral. + + .. note:: fractions refer to first and second positions only. For instance, + by default, 80% of first and second positions outside env are + deleterious. + + .. note:: the third positions are always neutral (synonymous). + ''' + + import numpy as np + + # Clear trait + self.clear_trait(traitnumber) + + # Handy + L = self.L + aL = np.arange(L) + + # Decide what mutation is of what kind + # Note: the rest, between + # + # lethal_fraction + deleterious_fraction and (1 - adaptive_fraction), + # + # is neutral, i.e. EXACTLY 0. Fair assumption. + onetwo_vector = (aL % 3) < 2 + random_numbers = np.random.random(L) + adaptive_mutations = (random_numbers > (1 - adaptive_fraction)) & onetwo_vector + lethal_mutations = (random_numbers < lethal_fraction) & onetwo_vector + deleterious_mutations = ((random_numbers > lethal_fraction) & \ + (random_numbers < (lethal_fraction + deleterious_fraction)) & \ + (random_numbers < (1 - adaptive_fraction)) & \ + onetwo_vector) + + # Decide how strong mutations are + single_locus_effects=np.zeros(L) + single_locus_effects[np.where(deleterious_mutations)] = -np.random.exponential(effect_size_deleterious, deleterious_mutations.sum()) + single_locus_effects[np.where(adaptive_mutations)] = np.random.exponential(effect_size_adaptive, adaptive_mutations.sum()) + single_locus_effects[np.where(lethal_mutations)] = -effect_size_lethal + + # Mutations in env are treated separately + env_position = (aL >= self.env.start) & (aL < self.env.end) + env_mutations = (random_numbers > (1 - env_fraction)) & onetwo_vector & env_position + single_locus_effects[np.where(env_mutations)] = np.random.exponential(effect_size_env, env_mutations.sum()) + + # Call the C++ routines + self.set_trait_additive(single_locus_effects, traitnumber) + + # Epistasis + multi_locus_coefficients=[] + def add_epitope(strength=0.2): + '''Note: we are in the +-1 basis.''' + loci = random.sample(range(9),2) + loci.sort() + depression = - 0.05 + f1 = depression*0.25 + f2 = depression*0.25 + f12 = depression*0.25 - strength*0.5 + return loci, f1,f2,f12 + + def add_valley(depth=0.1, height=0.01): + '''Note: we are in the +-1 basis.''' + f1 = height*0.25 + f2 = height*0.25 + f12 = height*0.25 + depth*0.5 + return (f1,f2,f12) + + # Set fitness valleys + for vi in range(number_valleys): + pos = np.random.random_integers(L/3-100) + d = int(np.random.exponential(10) + 1) + valley_str = np.random.exponential(valley_strength) + if number_valleys: + print('valley:', pos*3, valley_str) + (f1,f2,f12)=add_valley(valley_str) + single_locus_effects[pos*3+1]+=f1 + single_locus_effects[(pos+d)*3+1]+=f2 + multi_locus_coefficients.append([[pos*3+1, (pos+d)*3+1], f12]) + + # Set epitopes (bumps, i.e. f_DM < d_WT << f_SM) + for ei in range(number_epitopes): + pos = np.random.random_integers(L/3-10) + epi_strength = np.random.exponential(epitope_strength) + if number_epitopes: + print('epitope', pos*3, epi_strength) + epi, f1,f2,f12=add_epitope(epi_strength) + single_locus_effects[(pos+epi[0])*3+1]+=f1 + single_locus_effects[(pos+epi[1])*3+1]+=f2 + multi_locus_coefficients.append([[(pos+epi[0])*3+1, (pos+epi[1])*3+1], f12]) + + for mlc in multi_locus_coefficients: + self.add_trait_coefficient(mlc[1], np.asarray(mlc[0], int), traitnumber) + self._update_traits() + self._update_fitness() + + + def get_replication_additive(self): + '''The additive part of the replication lansdscape. + + Returns: + - coefficients: array of additive replication coefficients + + .. warning:: the -/+ basis is used throughout the library. + If you are used to the 0/1 basis, keep in mind that + the interaction series-expansion is different. + ''' + return self.get_trait_additive(0) + + + def set_replication_additive(self, coefficients): + '''Set the additive replication coefficients + + Parameters: + - coefficients: array of additive replication coefficients + + .. warning:: the -/+ basis is used throughout the library. + If you are used to the 0/1 basis, keep in mind that + the interaction series-expansion is different. + ''' + + self.set_trait_additive(coefficients, 0) + + + def get_resistance_additive(self): + '''The additive part of the resistance lansdscape. + + Returns: + - coefficients: array of additive drug resistance coefficients + + .. warning:: the -/+ basis is used throughout the library. + If you are used to the 0/1 basis, keep in mind that + the interaction series-expansion is different. + ''' + return self.get_trait_additive(1) + + + def set_resistance_additive(self, coefficients): + '''Set the additive drug resistance coefficients + + Parameters: + - coefficients: array of additive drug resistance coefficients + + .. warning:: the -/+ basis is used throughout the library. + If you are used to the 0/1 basis, keep in mind that + the interaction series-expansion is different. + ''' + + self.set_trait_additive(coefficients, 1) + + + + + def set_replication_landscape(self, + lethal_fraction=0.05, + deleterious_fraction=0.8, + adaptive_fraction=0.01, + effect_size_lethal=0.8, + effect_size_deleterious=0.1, + effect_size_adaptive=0.01, + env_fraction=0.1, + effect_size_env=0.01, + number_epitopes=0, + epitope_strength=0.05, + number_valleys=0, + valley_strength=0.1, + ): + '''Set the phenotypic landscape for the replication capacity of HIV. + + Parameters: + - lethal_fraction: fraction of lethal sites + - deleterious_fraction: fraction of deleterious sites + - adaptive_fraction: fraction of beneficial sites + - effect_size_lethal: effect of lethal changes + - effect_size_deleterious: average effect of deleterious changes + - effect_size_adaptive: average effect of beneficial changes + + - env_fraction: fraction of beneficial sites in env + - effect_size_env: average effect of beneficial changes in env + - number_epitopes: number of (epistatic) epitopes + - epitope_strength: average height of an epitope escape mutation + - number_valleys: number of (epistatic) valleys + - valley_strength: average depth of a valley + + .. note:: the effects of deleterious and beneficial sites are exponentially + distributed, i.e. most of them will still be almost neutral. + + .. note:: fractions refer to first and second positions only. For instance, + by default, 80% of first and second positions outside env are + deleterious. + + .. note:: the third positions are always neutral (synonymous). + ''' + + self.set_trait_landscape(traitnumber=0, + lethal_fraction=lethal_fraction, + deleterious_fraction=deleterious_fraction, + adaptive_fraction=adaptive_fraction, + effect_size_lethal=effect_size_lethal, + effect_size_deleterious=effect_size_deleterious, + effect_size_adaptive=effect_size_adaptive, + env_fraction=env_fraction, + effect_size_env=effect_size_env, + number_epitopes=number_epitopes, + epitope_strength=epitope_strength, + number_valleys=number_valleys, + valley_strength=valley_strength) + + + def set_resistance_landscape(self, + lethal_fraction=0.05, + deleterious_fraction=0.8, + adaptive_fraction=0.01, + effect_size_lethal=0.8, + effect_size_deleterious=0.1, + effect_size_adaptive=0.01, + env_fraction=0.1, + effect_size_env=0.01, + number_epitopes=0, + epitope_strength=0.05, + number_valleys=0, + valley_strength=0.1, + ): + '''Set the phenotypic landscape for the drug resistance of HIV. + + Parameters: + - lethal_fraction: fraction of lethal sites + - deleterious_fraction: fraction of deleterious sites + - adaptive_fraction: fraction of beneficial sites + - effect_size_lethal: effect of lethal changes + - effect_size_deleterious: average effect of deleterious changes + - effect_size_adaptive: average effect of beneficial changes + + - env_fraction: fraction of beneficial sites in env + - effect_size_env: average effect of beneficial changes in env + - number_epitopes: number of (epistatic) epitopes + - epitope_strength: average height of an epitope escape mutation + - number_valleys: number of (epistatic) valleys + - valley_strength: average depth of a valley + + .. note:: the effects of deleterious and beneficial sites are exponentially + distributed, i.e. most of them will still be almost neutral. + + .. note:: fractions refer to first and second positions only. For instance, + by default, 80% of first and second positions outside env are + deleterious. + + .. note:: the third positions are always neutral (synonymous). + ''' + + self.set_trait_landscape(traitnumber=1, + lethal_fraction=lethal_fraction, + deleterious_fraction=deleterious_fraction, + adaptive_fraction=adaptive_fraction, + effect_size_lethal=effect_size_lethal, + effect_size_deleterious=effect_size_deleterious, + effect_size_adaptive=effect_size_adaptive, + env_fraction=env_fraction, + effect_size_env=effect_size_env, + number_epitopes=number_epitopes, + epitope_strength=epitope_strength, + number_valleys=number_valleys, + valley_strength=valley_strength) + + + + +# Register hivpopulation in _FFPopSim: +_FFPopSim.hivpopulation_swigregister(hivpopulation) + diff --git a/src/python/FFPopSim_wrap.cpp b/src/python/FFPopSim_wrap.cpp new file mode 100644 index 0000000..8179b43 --- /dev/null +++ b/src/python/FFPopSim_wrap.cpp @@ -0,0 +1,39685 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.3.1 + * + * Do not make changes to this file unless you know what you are doing - modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + + +#define SWIG_VERSION 0x040301 +#define SWIGPYTHON +#define SWIG_PYTHON_DIRECTOR_NO_VTABLE +#define SWIG_CASTRANK_MODE +#define SWIG_PYTHON_CAST_MODE +#define SWIGPYTHON_FASTPROXY + +#define SWIG_name "_FFPopSim" +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if defined(__GNUC__) +# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + +/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ +#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) +# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + +/* Intel's compiler complains if a variable which was never initialised is + * cast to void, which is a common idiom which we use to indicate that we + * are aware a variable isn't used. So we just silence that warning. + * See: https://github.com/swig/swig/issues/192 for more discussion. + */ +#ifdef __INTEL_COMPILER +# pragma warning disable 592 +#endif + +#if defined(__cplusplus) && __cplusplus >=201103L +# define SWIG_NULLPTR nullptr +#else +# define SWIG_NULLPTR NULL +#endif + +/* ----------------------------------------------------------------------------- + * swigcompat.swg + * + * Macros to provide support compatibility with older C and C++ standards. + * + * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard. + * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option. + * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus. + * ----------------------------------------------------------------------------- */ + +/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF + * if you're missing it. + */ +#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \ + (defined __cplusplus && __cplusplus >= 201103L) || \ + defined SWIG_HAVE_SNPRINTF) && \ + !defined SWIG_NO_SNPRINTF +# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A) +# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B) +#else +/* Fallback versions ignore the buffer size, but most of our uses either have a + * fixed maximum possible size or dynamically allocate a buffer that's large + * enough. + */ +# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A) +# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B) +#endif + + +#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND) +/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */ +# include +#endif + +#if !defined(PY_SSIZE_T_CLEAN) && !defined(SWIG_NO_PY_SSIZE_T_CLEAN) +#define PY_SSIZE_T_CLEAN +#endif + +#if __GNUC__ >= 7 +#pragma GCC diagnostic push +#if defined(__cplusplus) && __cplusplus >=201703L +#pragma GCC diagnostic ignored "-Wregister" /* For python-2.7 headers that use register */ +#endif +#endif + +#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) +/* Use debug wrappers with the Python release dll */ + +#if defined(_MSC_VER) && _MSC_VER >= 1929 +/* Workaround compilation errors when redefining _DEBUG in MSVC 2019 version 16.10 and later + * See https://github.com/swig/swig/issues/2090 */ +# include +#endif + +# undef _DEBUG +# include +# define _DEBUG 1 +#else +# include +#endif + +#if defined(SWIGPYTHON_BUILTIN) && defined(SWIG_HEAPTYPES) +/* SWIG_HEAPTYPES is not ready for use with SWIGPYTHON_BUILTIN, but if turned on manually requires the following */ +#if PY_VERSION_HEX >= 0x03030000 && PY_VERSION_HEX < 0x030c0000 +#include +#define Py_READONLY READONLY +#define Py_T_PYSSIZET T_PYSSIZET +#endif +#endif + +#if __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif + +#include +#include + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 +#define SWIG_POINTER_NO_NULL 0x4 +#define SWIG_POINTER_CLEAR 0x8 +#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN) + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return an integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows returning the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +/* Runtime errors are < 0 */ +#define SWIG_ERROR (-1) +/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */ +/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */ +/* Errors < -200 are generic runtime specific errors */ +#define SWIG_ERROR_RELEASE_NOT_OWNED (-200) + +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporary objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del object mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast(r) (r) +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (equiv != 0 && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = SWIG_TypeNameComp(nb, ne, tb, te); + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +} + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. Choose the last + name. It should be the most specific; a fully resolved name + but not necessarily with default template parameters expanded. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + size_t l = 0; + size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + char d = *(c++); + unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = (unsigned char)((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = (unsigned char)((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (unsigned char)(d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (unsigned char)(d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + +/* Compatibility macros for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) +#define PyString_Check(name) PyBytes_Check(name) +#define PyString_FromString(x) PyUnicode_FromString(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) +#define PyString_AsString(str) PyBytes_AsString(str) +#define PyString_Size(str) PyBytes_Size(str) +#define PyString_InternFromString(key) PyUnicode_InternFromString(key) +#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE +#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) + +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + + +/* Wrapper around PyUnicode_AsUTF8AndSize - call Py_XDECREF on the returned pbytes when finished with the returned string */ +SWIGINTERN const char * +SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes) +{ +#if PY_VERSION_HEX >= 0x03030000 +# if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000 + *pbytes = NULL; + return PyUnicode_AsUTF8AndSize(str, psize); +# else + const char *chars; + *pbytes = PyUnicode_AsUTF8String(str); + chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL; + if (chars && psize) + *psize = PyBytes_Size(*pbytes); + return chars; +# endif +#else + char *chars = NULL; + *pbytes = NULL; + PyString_AsStringAndSize(str, &chars, psize); + return chars; +#endif +} + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} + +/* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */ +# define SWIGPY_USE_CAPSULE +#ifdef SWIGPYTHON_BUILTIN +# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule_builtin" SWIG_TYPE_TABLE_NAME +#else +# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule" SWIG_TYPE_TABLE_NAME +#endif +# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION "." SWIGPY_CAPSULE_ATTR_NAME) + +#if PY_VERSION_HEX < 0x03020000 +#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) +#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) +#define Py_hash_t long +#endif + +#ifdef Py_LIMITED_API +# define PyTuple_GET_ITEM PyTuple_GetItem +/* Note that PyTuple_SetItem() has different semantics from PyTuple_SET_ITEM as it decref's the original tuple item, so in general they cannot be used + interchangeably. However in SWIG-generated code PyTuple_SET_ITEM is only used with newly initialized tuples without any items and for them this does work. */ +# define PyTuple_SET_ITEM PyTuple_SetItem +# define PyTuple_GET_SIZE PyTuple_Size +# define PyCFunction_GET_FLAGS PyCFunction_GetFlags +# define PyCFunction_GET_FUNCTION PyCFunction_GetFunction +# define PyCFunction_GET_SELF PyCFunction_GetSelf +# define PyList_GET_ITEM PyList_GetItem +# define PyList_SET_ITEM PyList_SetItem +# define PySliceObject PyObject +#endif + +/* Increment and Decrement wrappers - for portability when using the stable abi and for performance otherwise */ +#ifdef Py_LIMITED_API +# define SWIG_Py_INCREF Py_IncRef +# define SWIG_Py_XINCREF Py_IncRef +# define SWIG_Py_DECREF Py_DecRef +# define SWIG_Py_XDECREF Py_DecRef +#else +# define SWIG_Py_INCREF Py_INCREF +# define SWIG_Py_XINCREF Py_XINCREF +# define SWIG_Py_DECREF Py_DECREF +# define SWIG_Py_XDECREF Py_XDECREF +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + case SWIG_NullReferenceError: + type = PyExc_TypeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + PyObject *bytes = NULL; + const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); + PyErr_Clear(); + SWIG_Py_XINCREF(type); + if (tmp) + PyErr_Format(type, "%s %s", tmp, mesg); + else + PyErr_Format(type, "%s", mesg); + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + SWIG_Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + +SWIGRUNTIME int +SWIG_Python_TypeErrorOccurred(PyObject *obj) +{ + PyObject *error; + if (obj) + return 0; + error = PyErr_Occurred(); + return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError); +} + +SWIGRUNTIME void +SWIG_Python_RaiseOrModifyTypeError(const char *message) +{ + if (SWIG_Python_TypeErrorOccurred(NULL)) { + /* Use existing TypeError to preserve stacktrace and enhance with given message */ + PyObject *newvalue; + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); +#if PY_VERSION_HEX >= 0x03000000 + newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message); +#else + newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message); +#endif + if (newvalue) { + SWIG_Py_XDECREF(value); + PyErr_Restore(type, newvalue, traceback); + } else { + PyErr_Restore(type, value, traceback); + } + } else { + /* Raise TypeError using given message */ + PyErr_SetString(PyExc_TypeError, message); + } +} + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# define SWIG_PYTHON_USE_GIL +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# if PY_VERSION_HEX < 0x03070000 +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# else +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { status = false; PyEval_RestoreThread(save); }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + const char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + +#ifdef __cplusplus +} +#endif + + +/* ----------------------------------------------------------------------------- + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */ +# error "This version of SWIG only supports Python >= 2.7" +#endif + +#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03030000 +# error "This version of SWIG only supports Python 3 >= 3.3" +#endif + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) + +#ifdef SWIGPYTHON_BUILTIN +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) +#else +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) +#endif + +#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) + +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + SWIG_Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +#if defined(SWIGPYTHON_BUILTIN) + +SWIGINTERN void +SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { + PyObject *s = PyString_InternFromString(key); + PyList_Append(seq, s); + SWIG_Py_DECREF(s); +} + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { + PyDict_SetItemString(d, name, obj); + SWIG_Py_DECREF(obj); + if (public_interface) + SwigPyBuiltin_AddPublicSymbol(public_interface, name); +} + +#else + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, name, obj); + SWIG_Py_DECREF(obj); +} + +#endif + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) { + if (!result) { + result = obj; + } else if (result == Py_None && is_void) { + SWIG_Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + if (result) { + PyList_SET_ITEM(result, 0, o2); + } else { + SWIG_Py_DECREF(obj); + return o2; + } + } + PyList_Append(result,obj); + SWIG_Py_DECREF(obj); + } + return result; +} + +/* Unpack the argument tuple */ + +SWIGINTERN Py_ssize_t +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + if (min <= 1 && max >= 1) { + Py_ssize_t i; + objs[0] = args; + for (i = 1; i < max; ++i) { + objs[i] = 0; + } + return 2; + } + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + Py_ssize_t i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +SWIGINTERN int +SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) { + int no_kwargs = 1; + if (kwargs) { + assert(PyDict_Check(kwargs)); + if (PyDict_Size(kwargs) > 0) { + PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name); + no_kwargs = 0; + } + } + return no_kwargs; +} + +/* A functor is a function object with one single object argument */ +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + +/* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + +typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; +} swig_globalvar; + +typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; +} swig_varlinkobject; + +SWIGINTERN PyObject * +swig_varlink_repr(PyObject *SWIGUNUSEDPARM(v)) { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_InternFromString(""); +#else + return PyString_FromString(""); +#endif +} + +SWIGINTERN PyObject * +swig_varlink_str(PyObject *o) { + swig_varlinkobject *v = (swig_varlinkobject *) o; +#if PY_VERSION_HEX >= 0x03000000 + PyObject *str = PyUnicode_InternFromString("("); + PyObject *tail; + PyObject *joined; + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + tail = PyUnicode_FromString(var->name); + joined = PyUnicode_Concat(str, tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); + str = joined; + if (var->next) { + tail = PyUnicode_InternFromString(", "); + joined = PyUnicode_Concat(str, tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); + str = joined; + } + } + tail = PyUnicode_InternFromString(")"); + joined = PyUnicode_Concat(str, tail); + SWIG_Py_DECREF(str); + SWIG_Py_DECREF(tail); + str = joined; +#else + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); +#endif + return str; +} + +SWIGINTERN void +swig_varlink_dealloc(PyObject *o) { + swig_varlinkobject *v = (swig_varlinkobject *) o; + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } +} + +SWIGINTERN PyObject * +swig_varlink_getattr(PyObject *o, char *n) { + swig_varlinkobject *v = (swig_varlinkobject *) o; + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; +} + +SWIGINTERN int +swig_varlink_setattr(PyObject *o, char *n, PyObject *p) { + swig_varlinkobject *v = (swig_varlinkobject *) o; + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); + } + return res; +} + +#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +#define SWIG_HEAPTYPES +#endif + +SWIGINTERN PyTypeObject* +swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; +#ifndef SWIG_HEAPTYPES + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "swigvarlink", /* tp_name */ + sizeof(swig_varlinkobject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) swig_varlink_dealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc)0, /* tp_print */ +#else + (Py_ssize_t)0, /* tp_vectorcall_offset */ +#endif + (getattrfunc) swig_varlink_getattr, /* tp_getattr */ + (setattrfunc) swig_varlink_setattr, /* tp_setattr */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc) swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030c0000 + 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + varlink_type = tmp; + type_init = 1; + if (PyType_Ready(&varlink_type) < 0) + return NULL; + } + return &varlink_type; +#else + PyType_Slot slots[] = { + { Py_tp_dealloc, (void *)swig_varlink_dealloc }, + { Py_tp_repr, (void *)swig_varlink_repr }, + { Py_tp_getattr, (void *)swig_varlink_getattr }, + { Py_tp_setattr, (void *)swig_varlink_setattr }, + { Py_tp_str, (void *)swig_varlink_str }, + { Py_tp_doc, (void *)varlink__doc__ }, + { 0, NULL } + }; + PyType_Spec spec = { + "swigvarlink", + sizeof(swig_varlinkobject), + 0, + Py_TPFLAGS_DEFAULT, + slots + }; + return (PyTypeObject *)PyType_FromSpec(&spec); +#endif +} + +/* Create a variable linking object for use later */ +SWIGINTERN PyObject * +SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_New(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); +} + +SWIGINTERN void +SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + memcpy(gv->name, name, size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; +} + + +static PyObject *Swig_Globals_global = NULL; + +SWIGINTERN PyObject * +SWIG_globals(void) { + if (Swig_Globals_global == NULL) { + Swig_Globals_global = SWIG_newvarlink(); + } + return Swig_Globals_global; +} + +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) +#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) + +#ifdef __cplusplus +extern "C" { +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + SWIG_Py_INCREF(none); + return none; +} + +/* SwigPyClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; + PyTypeObject *pytype; +} SwigPyClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + int fail = data ? data->implicitconv : 0; + if (fail) + PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors."); + return fail; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + /* the klass element */ + data->klass = obj; + SWIG_Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + SWIG_Py_INCREF(obj); + data->newargs = obj; + } else { + data->newraw = PyObject_GetAttrString(data->klass, "__new__"); + if (data->newraw) { + data->newargs = PyTuple_New(1); + if (data->newargs) { + SWIG_Py_INCREF(obj); + PyTuple_SET_ITEM(data->newargs, 0, obj); + } else { + SWIG_Py_DECREF(data->newraw); + SWIG_Py_DECREF(data->klass); + free(data); + return 0; + } + } else { + SWIG_Py_INCREF(obj); + data->newargs = obj; + } + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + data->delargs = !(PyCFunction_GET_FLAGS(data->destroy) & METH_O); + } else { + data->delargs = 0; + } + data->implicitconv = 0; + data->pytype = 0; + return data; + } +} + +SWIGRUNTIME void +SwigPyClientData_Del(SwigPyClientData *data) +{ + SWIG_Py_XDECREF(data->klass); + SWIG_Py_XDECREF(data->newraw); + SWIG_Py_XDECREF(data->newargs); + SWIG_Py_XDECREF(data->destroy); + free(data); +} + +/* =============== SwigPyObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +#ifdef SWIGPYTHON_BUILTIN + PyObject *dict; +#endif +} SwigPyObject; + + +#ifdef SWIGPYTHON_BUILTIN + +SWIGRUNTIME PyObject * +SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + + if (!sobj->dict) + sobj->dict = PyDict_New(); + + SWIG_Py_XINCREF(sobj->dict); + return sobj->dict; +} + +#endif + +SWIGRUNTIME PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + PyObject *val = SwigPyObject_long(v); + if (val) { + PyObject *ofmt; + PyTuple_SET_ITEM(args, 0, val); + ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else + res = PyString_Format(ofmt,args); +#endif + SWIG_Py_DECREF(ofmt); + } + } + SWIG_Py_DECREF(args); + } + return res; +} + +SWIGRUNTIME PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_repr(SwigPyObject *v) +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); + if (repr && v->next) { + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); + if (nrep) { +# if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + SWIG_Py_DECREF(repr); + SWIG_Py_DECREF(nrep); + repr = joined; +# else + PyString_ConcatAndDel(&repr,nrep); +# endif + } else { + SWIG_Py_DECREF(repr); + repr = NULL; + } + } + return repr; +} + +/* We need a version taking two PyObject* parameters so it's a valid + * PyCFunction to use in swigobject_methods[]. */ +SWIGRUNTIME PyObject * +SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) +{ + return SwigPyObject_repr((SwigPyObject*)v); +} + +SWIGRUNTIME int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +/* Added for Python 3.x, would it also be useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res = NULL; + if (!PyErr_Occurred()) { + if (op != Py_EQ && op != Py_NE) { + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); + } + return res; +} + + +SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); + +#ifdef SWIGPYTHON_BUILTIN +static swig_type_info *SwigPyObject_stype = 0; +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + SwigPyClientData *cd; + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + assert(cd); + assert(cd->pytype); + return cd->pytype; +} +#else +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); + return type; +} +#endif + +SWIGRUNTIMEINLINE int +SwigPyObject_Check(PyObject *op) { + PyTypeObject *target_tp = SwigPyObject_type(); + PyTypeObject *op_type = Py_TYPE(op); +#ifdef SWIGPYTHON_BUILTIN + if (PyType_IsSubtype(op_type, target_tp)) + return 1; + return (strcmp(op_type->tp_name, "SwigPyObject") == 0); +#else +# ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif + if (op_type == target_tp) + return 1; +# ifdef Py_LIMITED_API + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + if (!tp_name) + return 0; + cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject"); + SWIG_Py_DECREF(tp_name); + return cmp == 0; +# else + return (strcmp(op_type->tp_name, "SwigPyObject") == 0); +# endif +#endif +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); + +static PyObject* Swig_Capsule_global = NULL; + +SWIGRUNTIME void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + + /* PyObject_CallFunction() has the potential to silently drop + the active exception. In cases of unnamed temporary + variable or where we just finished iterating over a generator + StopIteration will be active right now, and this needs to + remain true upon return from SwigPyObject_dealloc. So save + and restore. */ + + PyObject *type = NULL, *value = NULL, *traceback = NULL; + PyErr_Fetch(&type, &value, &traceback); + + if (data->delargs) { + /* we need to create a temporary object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + if (tmp) { + res = SWIG_Python_CallFunctor(destroy, tmp); + } else { + res = 0; + } + SWIG_Py_XDECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + if (!res) + PyErr_WriteUnraisable(destroy); + + PyErr_Restore(type, value, traceback); + + SWIG_Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + SWIG_Py_XDECREF(Swig_Capsule_global); + } + SWIG_Py_XDECREF(next); +#ifdef SWIGPYTHON_BUILTIN + SWIG_Py_XDECREF(sobj->dict); +#endif + PyObject_Free(v); +} + +SWIGRUNTIME PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (!SwigPyObject_Check(next)) { + PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); + return NULL; + } + ((SwigPyObject *)next)->next = sobj->next; + sobj->next = next; + SWIG_Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + SWIG_Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) { + return NULL; + } else { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { + if (PyObject_IsTrue(val)) { + SWIG_Py_DECREF(SwigPyObject_acquire(v,args)); + } else { + SWIG_Py_DECREF(SwigPyObject_disown(v,args)); + } + } + return obj; + } +} + +static PyMethodDef +swigobject_methods[] = { + {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"}, + {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"}, + {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"}, + {"append", SwigPyObject_append, METH_O, "appends another 'this' object"}, + {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"}, + {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"}, + {0, 0, 0, 0} +}; + +SWIGRUNTIME PyTypeObject* +SwigPyObject_TypeOnce(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; +#ifndef SWIG_HEAPTYPES + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc)0, /*nb_divide*/ +#endif + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_long, /*nb_long*/ +#else + 0, /*nb_reserved*/ +#endif + (unaryfunc)0, /*nb_float*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ +#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#else + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#endif + }; + + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc)0, /* tp_print */ +#else + (Py_ssize_t)0, /* tp_vectorcall_offset */ +#endif + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ +#else + (cmpfunc)SwigPyObject_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + 0, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030c0000 + 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + swigpyobject_type = tmp; + type_init = 1; + if (PyType_Ready(&swigpyobject_type) != 0) + return NULL; + } + return &swigpyobject_type; +#else + PyType_Slot slots[] = { + { Py_tp_dealloc, (void *)SwigPyObject_dealloc }, + { Py_tp_repr, (void *)SwigPyObject_repr }, + { Py_tp_getattro, (void *)PyObject_GenericGetAttr }, + { Py_tp_doc, (void *)swigobject_doc }, + { Py_tp_richcompare, (void *)SwigPyObject_richcompare }, + { Py_tp_methods, (void *)swigobject_methods }, + { Py_nb_int, (void *)SwigPyObject_long }, + { 0, NULL } + }; + PyType_Spec spec = { + "SwigPyObject", + sizeof(SwigPyObject), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, + slots + }; + return (PyTypeObject *)PyType_FromSpec(&spec); +#endif +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = PyObject_New(SwigPyObject, SwigPyObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; +#ifdef SWIGPYTHON_BUILTIN + sobj->dict = 0; +#endif + if (own == SWIG_POINTER_OWN) { + /* Obtain a reference to the Python capsule wrapping the module information, so that the + * module information is correctly destroyed after all SWIG python objects have been freed + * by the GC (and corresponding destructors invoked) */ + SWIG_Py_XINCREF(Swig_Capsule_global); + } + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; + +SWIGRUNTIME PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return SWIG_Python_str_FromFormat("", result, v->ty->name); + } else { + return SWIG_Python_str_FromFormat("", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} + +SWIGRUNTIME int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyPacked_Check(PyObject *op) { +#ifdef Py_LIMITED_API + int cmp; + PyObject *tp_name; +#endif + PyTypeObject* op_type = Py_TYPE(op); + if (op_type == SwigPyPacked_TypeOnce()) + return 1; +#ifdef Py_LIMITED_API + tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__"); + if (!tp_name) + return 0; + cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked"); + SWIG_Py_DECREF(tp_name); + return cmp == 0; +#else + return (strcmp(op_type->tp_name, "SwigPyPacked") == 0); +#endif +} + +SWIGRUNTIME void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_Free(v); +} + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_TypeOnce(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; +#ifndef SWIG_HEAPTYPES + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp = { +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc)0, /* tp_print */ +#else + (Py_ssize_t)0, /* tp_vectorcall_offset */ +#endif + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX>=0x03000000 + 0, /* tp_reserved in 3.0.1 */ +#else + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030c0000 + 0, /* tp_watched */ +#endif +#if PY_VERSION_HEX >= 0x030d00a4 + 0, /* tp_versions_used */ +#endif +#ifdef COUNT_ALLOCS + 0, /* tp_allocs */ + 0, /* tp_frees */ + 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0 /* tp_next */ +#endif + }; + swigpypacked_type = tmp; + type_init = 1; + if (PyType_Ready(&swigpypacked_type) != 0) + return NULL; + } + return &swigpypacked_type; +#else + PyType_Slot slots[] = { + { Py_tp_dealloc, (void *)SwigPyPacked_dealloc }, + { Py_tp_repr, (void *)SwigPyPacked_repr }, + { Py_tp_str, (void *)SwigPyPacked_str }, + { Py_tp_getattro, (void *)PyObject_GenericGetAttr }, + { Py_tp_doc, (void *)swigpacked_doc }, + { 0, NULL } + }; + PyType_Spec spec = { + "SwigPyPacked", + sizeof(SwigPyPacked), + 0, + Py_TPFLAGS_DEFAULT, + slots + }; + return (PyTypeObject *)PyType_FromSpec(&spec); +#endif +} + +SWIGRUNTIME PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = PyObject_New(SwigPyPacked, SwigPyPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_Free((PyObject *)sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +static PyObject *Swig_This_global = NULL; + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + if (Swig_This_global == NULL) + Swig_This_global = SWIG_Python_str_FromChar("this"); + return Swig_This_global; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + PyObject *obj; + + if (SwigPyObject_Check(pyobj)) + return (SwigPyObject *) pyobj; + +#ifdef SWIGPYTHON_BUILTIN + (void)obj; +# ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { +#if PY_VERSION_HEX >= 0x030d0000 + PyWeakref_GetRef(pyobj, &pyobj); + Py_DECREF(pyobj); +#else + pyobj = PyWeakref_GET_OBJECT(pyobj); +#endif + if (pyobj && SwigPyObject_Check(pyobj)) + return (SwigPyObject*) pyobj; + } +# endif + return NULL; +#else + + obj = 0; + +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + SWIG_Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + SWIG_Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; +#endif +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + int res; + SwigPyObject *sobj; + int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; + + if (!obj) + return SWIG_ERROR; + if (obj == Py_None && !implicit_conv) { + if (ptr) + *ptr = 0; + return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK; + } + + res = SWIG_ERROR; + + sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !sobj->own) { + res = SWIG_ERROR_RELEASE_NOT_OWNED; + } else { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + if (flags & SWIG_POINTER_CLEAR) { + sobj->ptr = 0; + } + res = SWIG_OK; + } + } else { + if (implicit_conv) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + SWIG_Py_DECREF(impconv); + } + } + } + if (!SWIG_IsOK(res) && obj == Py_None) { + if (ptr) + *ptr = 0; + if (PyErr_Occurred()) + PyErr_Clear(); + res = SWIG_OK; + } + } + } + return res; +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + swig_cast_info *tc; + + /* here we get the method pointer for callbacks */ +#ifndef Py_LIMITED_API + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); +#else + PyObject* pystr_doc = PyObject_GetAttrString(obj, "__doc__"); + PyObject *bytes = NULL; + const char *doc = pystr_doc ? SWIG_PyUnicode_AsUTF8AndSize(pystr_doc, NULL, &bytes) : 0; +#endif + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; +#ifdef Py_LIMITED_API + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(pystr_doc); +#endif + if (!desc) + return SWIG_ERROR; + tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + return SWIG_OK; + } +} + +/* Convert a packed pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, without calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + } else{ + SWIG_Py_DECREF(inst); + inst = 0; + } + } +#else + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + SWIG_Py_DECREF(inst); + inst = 0; + } +#endif + } + } else { +#if PY_VERSION_HEX >= 0x03000000 + PyObject *empty_args = PyTuple_New(0); + if (empty_args) { + PyObject *empty_kwargs = PyDict_New(); + if (empty_kwargs) { +#ifndef Py_LIMITED_API + newfunc newfn = ((PyTypeObject *)data->newargs)->tp_new; +#else + newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new); +#endif + inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs); + SWIG_Py_DECREF(empty_kwargs); + if (inst) { + if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) { + SWIG_Py_DECREF(inst); + inst = 0; + } else { + PyType_Modified(Py_TYPE(inst)); + } + } + } + SWIG_Py_DECREF(empty_args); + } +#else + PyObject *dict = PyDict_New(); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + SWIG_Py_DECREF(dict); + } +#endif + } + return inst; +} + +SWIGRUNTIME int +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + if (dict) { + return PyDict_SetItem(dict, SWIG_This(), swig_this); + } else{ + return -1; + } + } +#endif + return PyObject_SetAttr(inst, SWIG_This(), swig_this); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { + return NULL; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SWIG_Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1])); + } else { + if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0) + return NULL; + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { + SwigPyClientData *clientdata; + PyObject * robj; + int own; + + if (!ptr) + return SWIG_Py_Void(); + + clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + if (clientdata && clientdata->pytype) { + SwigPyObject *newobj; + if (flags & SWIG_BUILTIN_TP_INIT) { + newobj = (SwigPyObject*) self; + if (newobj->ptr) { +#ifndef Py_LIMITED_API + allocfunc alloc = clientdata->pytype->tp_alloc; +#else + allocfunc alloc = (allocfunc)PyType_GetSlot(clientdata->pytype, Py_tp_alloc); +#endif + PyObject *next_self = alloc(clientdata->pytype, 0); + while (newobj->next) + newobj = (SwigPyObject *) newobj->next; + newobj->next = next_self; + newobj = (SwigPyObject *)next_self; +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + } + } else { + newobj = PyObject_New(SwigPyObject, clientdata->pytype); +#ifdef SWIGPYTHON_BUILTIN + if (newobj) { + newobj->dict = 0; + } +#endif + } + if (newobj) { + newobj->ptr = ptr; + newobj->ty = type; + newobj->own = own; + newobj->next = 0; + return (PyObject*) newobj; + } + return SWIG_Py_Void(); + } + + assert(!(flags & SWIG_BUILTIN_TP_INIT)); + + robj = SwigPyObject_New(ptr, type, own); + if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + SWIG_Py_DECREF(robj); + robj = inst; + } + return robj; +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +static PyObject *Swig_TypeCache_global = NULL; + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + if (Swig_TypeCache_global == NULL) { + Swig_TypeCache_global = PyDict_New(); + } + return Swig_TypeCache_global; +} + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { +#ifdef SWIG_LINK_RUNTIME + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); + } +#else + void *type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + return (swig_module_info *) type_pointer; +} + + +static int interpreter_counter = 0; /* how many (sub-)interpreters are using swig_module's types */ + +SWIGRUNTIME void +SWIG_Python_DestroyModule(PyObject *obj) +{ + swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); + swig_type_info **types = swig_module->types; + size_t i; + if (--interpreter_counter != 0) /* another sub-interpreter may still be using the swig_module's types */ + return; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + ty->clientdata = 0; + if (data) SwigPyClientData_Del(data); + } + } + SWIG_Py_DECREF(SWIG_This()); + Swig_This_global = NULL; + SWIG_Py_DECREF(SWIG_globals()); + Swig_Globals_global = NULL; + SWIG_Py_DECREF(SWIG_Python_TypeCache()); + Swig_TypeCache_global = NULL; + Swig_Capsule_global = NULL; +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ + PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); +#endif + PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); + if (pointer && module) { + if (PyModule_AddObject(module, SWIGPY_CAPSULE_ATTR_NAME, pointer) == 0) { + ++interpreter_counter; + Swig_Capsule_global = pointer; + } else { + SWIG_Py_DECREF(pointer); + } + } else { + SWIG_Py_XDECREF(pointer); + } +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); + } else { + swig_module_info *swig_module = SWIG_GetModule(0); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCapsule_New((void*) descriptor, NULL, NULL); + if (obj) { + PyDict_SetItem(cache, key, obj); + SWIG_Py_DECREF(obj); + } + } + } + SWIG_Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + PyObject *bytes = NULL; + const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes); + const char *errmesg = tmp ? tmp : "Invalid error message"; + SWIG_Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, errmesg); + } else { + PyErr_Format(type, "%s %s", errmesg, mesg); + } + SWIG_Py_XDECREF(bytes); + SWIG_Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : ""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + (void) obj; + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { +#ifndef Py_LIMITED_API + /* tp_name is not accessible */ + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + PyObject *bytes = NULL; + const char *cstr = str ? SWIG_PyUnicode_AsUTF8AndSize(str, NULL, &bytes) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + SWIG_Py_XDECREF(bytes); + SWIG_Py_XDECREF(str); + return; + } +#endif + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); + } + return result; +} + +#ifdef SWIGPYTHON_BUILTIN +SWIGRUNTIME int +SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { + PyTypeObject *tp = obj->ob_type; + PyObject *descr; + PyObject *encoded_name; + descrsetfunc f; + int res = -1; + +# ifdef Py_USING_UNICODE + if (PyString_Check(name)) { + name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); + if (!name) + return -1; + } else if (!PyUnicode_Check(name)) +# else + if (!PyString_Check(name)) +# endif + { + PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); + return -1; + } else { + SWIG_Py_INCREF(name); + } + + if (!tp->tp_dict) { + if (PyType_Ready(tp) != 0) + goto done; + } + + descr = _PyType_Lookup(tp, name); + f = NULL; + if (descr != NULL) + f = descr->ob_type->tp_descr_set; + if (!f) { + if (PyString_Check(name)) { + encoded_name = name; + SWIG_Py_INCREF(name); + } else { + encoded_name = PyUnicode_AsUTF8String(name); + if (!encoded_name) + goto done; + } + PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); + SWIG_Py_DECREF(encoded_name); + } else { + res = f(descr, obj, value); + } + + done: + SWIG_Py_DECREF(name); + return res; +} +#endif + + +#ifdef __cplusplus +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0) + + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Method creation and docstring support functions */ + +SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name); +SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); +SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func); + +#ifdef __cplusplus +} +#endif + + + #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_allocator_type swig_types[0] +#define SWIGTYPE_p_char swig_types[1] +#define SWIGTYPE_p_clone_t swig_types[2] +#define SWIGTYPE_p_difference_type swig_types[3] +#define SWIGTYPE_p_double swig_types[4] +#define SWIGTYPE_p_edge_t swig_types[5] +#define SWIGTYPE_p_genotype_value_pair_t swig_types[6] +#define SWIGTYPE_p_haploid_highd swig_types[7] +#define SWIGTYPE_p_haploid_lowd swig_types[8] +#define SWIGTYPE_p_hivgene swig_types[9] +#define SWIGTYPE_p_hivpopulation swig_types[10] +#define SWIGTYPE_p_index_value_pair_t swig_types[11] +#define SWIGTYPE_p_int swig_types[12] +#define SWIGTYPE_p_istream swig_types[13] +#define SWIGTYPE_p_key_type swig_types[14] +#define SWIGTYPE_p_mapped_type swig_types[15] +#define SWIGTYPE_p_multi_locus_genealogy swig_types[16] +#define SWIGTYPE_p_node_t swig_types[17] +#define SWIGTYPE_p_ostream swig_types[18] +#define SWIGTYPE_p_p_PyObject swig_types[19] +#define SWIGTYPE_p_poly_t swig_types[20] +#define SWIGTYPE_p_rooted_tree swig_types[21] +#define SWIGTYPE_p_size_type swig_types[22] +#define SWIGTYPE_p_stat_t swig_types[23] +#define SWIGTYPE_p_std__allocatorT_int_t swig_types[24] +#define SWIGTYPE_p_std__allocatorT_node_t_t swig_types[25] +#define SWIGTYPE_p_std__allocatorT_poly_t_t swig_types[26] +#define SWIGTYPE_p_std__allocatorT_std__pairT_tree_key_t_const_edge_t_t_t swig_types[27] +#define SWIGTYPE_p_std__allocatorT_std__pairT_tree_key_t_const_node_t_t_t swig_types[28] +#define SWIGTYPE_p_std__allocatorT_step_t_t swig_types[29] +#define SWIGTYPE_p_std__allocatorT_tree_key_t_t swig_types[30] +#define SWIGTYPE_p_std__invalid_argument swig_types[31] +#define SWIGTYPE_p_std__lessT_tree_key_t_t swig_types[32] +#define SWIGTYPE_p_std__listT_tree_key_t_t swig_types[33] +#define SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t swig_types[34] +#define SWIGTYPE_p_std__mapT_tree_key_t_node_t_t swig_types[35] +#define SWIGTYPE_p_std__vectorT_int_t swig_types[36] +#define SWIGTYPE_p_std__vectorT_node_t_t swig_types[37] +#define SWIGTYPE_p_std__vectorT_poly_t_t swig_types[38] +#define SWIGTYPE_p_std__vectorT_step_t_t swig_types[39] +#define SWIGTYPE_p_std__vectorT_tree_key_t_t swig_types[40] +#define SWIGTYPE_p_step_t swig_types[41] +#define SWIGTYPE_p_swig__SwigPyIterator swig_types[42] +#define SWIGTYPE_p_tree_key_t swig_types[43] +#define SWIGTYPE_p_value_type swig_types[44] +static swig_type_info *swig_types[46]; +static swig_module_info swig_module = {swig_types, 45, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#ifdef SWIG_TypeQuery +# undef SWIG_TypeQuery +#endif +#define SWIG_TypeQuery SWIG_Python_TypeQuery + +/*----------------------------------------------- + @(target):= _FFPopSim.so + ------------------------------------------------*/ +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_init PyInit__FFPopSim + +#else +# define SWIG_init init_FFPopSim + +#endif + +#ifdef __cplusplus +#include +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigSmartPointer { + T *ptr; + SwigSmartPointer(T *p) : ptr(p) { } + ~SwigSmartPointer() { delete ptr; } + SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; } +#if __cplusplus >=201103L + SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; } + operator T&&() const { return std::move(*pointer.ptr); } +#else + operator T&() const { return *pointer.ptr; } +#endif + T *operator&() const { return pointer.ptr; } + static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); } +}; + +/* + * SwigValueInit() is a generic initialisation solution as the following approach: + * + * T c_result = T(); + * + * doesn't compile for all types for example: + * + * unsigned int c_result = unsigned int(); + */ +template T SwigValueInit() { + return T(); +} + +#if __cplusplus >=201103L +# define SWIG_STD_MOVE(OBJ) std::move(OBJ) +#else +# define SWIG_STD_MOVE(OBJ) OBJ +#endif + +#endif + + +#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) + + +#include + + +namespace swig { + class SwigPtr_PyObject { + protected: + PyObject *_obj; + + public: + SwigPtr_PyObject() :_obj(0) + { + } + + SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + SWIG_Py_XINCREF(_obj); + SWIG_PYTHON_THREAD_END_BLOCK; + } + + SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) + { + if (initial_ref) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + SWIG_Py_XINCREF(_obj); + SWIG_PYTHON_THREAD_END_BLOCK; + } + } + + SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + SWIG_Py_XINCREF(item._obj); + SWIG_Py_XDECREF(_obj); + _obj = item._obj; + SWIG_PYTHON_THREAD_END_BLOCK; + return *this; + } + + ~SwigPtr_PyObject() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + SWIG_Py_XDECREF(_obj); + SWIG_PYTHON_THREAD_END_BLOCK; + } + + operator PyObject *() const + { + return _obj; + } + + PyObject *operator->() const + { + return _obj; + } + }; +} + + +namespace swig { + struct SwigVar_PyObject : SwigPtr_PyObject { + SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } + + SwigVar_PyObject & operator = (PyObject* obj) + { + SWIG_Py_XDECREF(_obj); + _obj = obj; + return *this; + } + }; +} + + +#define SWIG_FILE_WITH_INIT +#include "../ffpopsim_generic.h" +#include "../ffpopsim_lowd.h" +#include "../ffpopsim_highd.h" +#include "../hivpopulation.h" + + +#include + + +#include + +#if PY_VERSION_HEX >= 0x03020000 +# define SWIGPY_SLICEOBJECT PyObject +#else +# define SWIGPY_SLICEOBJECT PySliceObject +#endif + + +#include +#include + + +#if defined(__GNUC__) +# if __GNUC__ == 2 && __GNUC_MINOR <= 96 +# define SWIG_STD_NOMODERN_STL +# endif +#endif + + +#include + + +namespace swig { + struct stop_iteration { + }; + + struct SwigPyIterator { + private: + SwigPtr_PyObject _seq; + + protected: + SwigPyIterator(PyObject *seq) : _seq(seq) + { + } + + public: + virtual ~SwigPyIterator() {} + + // Access iterator method, required by Python + virtual PyObject *value() const = 0; + + // Forward iterator method, required by Python + virtual SwigPyIterator *incr(size_t n = 1) = 0; + + // Backward iterator method, very common in C++, but not required in Python + virtual SwigPyIterator *decr(size_t /*n*/ = 1) + { + throw stop_iteration(); + } + + // Random access iterator methods, but not required in Python + virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const + { + throw std::invalid_argument("operation not supported"); + } + + virtual bool equal (const SwigPyIterator &/*x*/) const + { + throw std::invalid_argument("operation not supported"); + } + + // C++ common/needed methods + virtual SwigPyIterator *copy() const = 0; + + PyObject *next() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads + PyObject *obj = value(); + incr(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; + } + + /* Make an alias for Python 3.x */ + PyObject *__next__() + { + return next(); + } + + PyObject *previous() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads + decr(); + PyObject *obj = value(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; + } + + SwigPyIterator *advance(ptrdiff_t n) + { + return (n > 0) ? incr(n) : decr(-n); + } + + bool operator == (const SwigPyIterator& x) const + { + return equal(x); + } + + bool operator != (const SwigPyIterator& x) const + { + return ! operator==(x); + } + + SwigPyIterator& operator += (ptrdiff_t n) + { + return *advance(n); + } + + SwigPyIterator& operator -= (ptrdiff_t n) + { + return *advance(-n); + } + + SwigPyIterator* operator + (ptrdiff_t n) const + { + return copy()->advance(n); + } + + SwigPyIterator* operator - (ptrdiff_t n) const + { + return copy()->advance(-n); + } + + ptrdiff_t operator - (const SwigPyIterator& x) const + { + return x.distance(*this); + } + + static swig_type_info* descriptor() { + static swig_type_info* desc = SWIG_TypeQuery("swig::SwigPyIterator *"); + return desc; + } + }; + +#if defined(SWIGPYTHON_BUILTIN) + inline PyObject* make_output_iterator_builtin (PyObject *pyself) + { + SWIG_Py_INCREF(pyself); + return pyself; + } +#endif +} + + +SWIGINTERN int +SWIG_AsVal_double (PyObject *obj, double *val) +{ + int res = SWIG_TypeError; + if (PyFloat_Check(obj)) { + if (val) *val = PyFloat_AsDouble(obj); + return SWIG_OK; +#if PY_VERSION_HEX < 0x03000000 + } else if (PyInt_Check(obj)) { + if (val) *val = (double) PyInt_AsLong(obj); + return SWIG_OK; +#endif + } else if (PyLong_Check(obj)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + double d = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = d; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); + } else { + PyErr_Clear(); + } + } + } +#endif + return res; +} + + +#include + + +#include + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx, cx, rd; + errno = 0; + fx = floor(x); + cx = ceil(x); + rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else +#endif + if (PyLong_Check(obj)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + // Largest double not larger than ULONG_MAX (not portably calculated easily) + // Note that double(ULONG_MAX) is stored in a double rounded up by one (for 64-bit unsigned long) + // 0xfffffffffffff800ULL == (uint64_t)std::nextafter(double(__uint128_t(ULONG_MAX)+1), double(0)) + const double ulong_max = sizeof(unsigned long) == 8 ? 0xfffffffffffff800ULL : ULONG_MAX; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ulong_max)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); + } +#endif + return res; +} + + + #define SWIG_From_long PyInt_FromLong + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_long_SS_long (long long value) +{ + return ((value < LONG_MIN) || (value > LONG_MAX)) ? + PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value)); +} +#endif + + +SWIGINTERNINLINE PyObject * +SWIG_From_ptrdiff_t (ptrdiff_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(ptrdiff_t) <= sizeof(long)) { +#endif + return SWIG_From_long (static_cast< long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(ptrdiff_t) <= sizeof(long long) */ + return SWIG_From_long_SS_long (static_cast< long long >(value)); + } +#endif +} + + +SWIGINTERNINLINE PyObject* + SWIG_From_bool (bool value) +{ + return PyBool_FromLong(value ? 1 : 0); +} + + +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) +{ +#if PY_VERSION_HEX < 0x03000000 + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else +#endif + if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + return SWIG_OverflowError; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + // Largest double not larger than LONG_MAX (not portably calculated easily) + // Note that double(LONG_MAX) is stored in a double rounded up by one (for 64-bit long) + // 0x7ffffffffffffc00LL == (int64_t)std::nextafter(double(__uint128_t(LONG_MAX)+1), double(0)) + const double long_max = sizeof(long) == 8 ? 0x7ffffffffffffc00LL : LONG_MAX; + // No equivalent needed for 64-bit double(LONG_MIN) is exactly LONG_MIN + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, long_max)) { + if (val) *val = (long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_long_SS_long (PyObject *obj, long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + long long v = PyLong_AsLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + long v; + res = SWIG_AsVal_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + const double mant_min = -mant_max; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) { + if (val) *val = (long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(ptrdiff_t) <= sizeof(long)) { +#endif + long v; + res = SWIG_AsVal_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(ptrdiff_t) <= sizeof(long long)) { + long long v; + res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); + } +#endif + return res; +} + + +#include + + +#include + + +#include + + +#include + + +#include + + +#include + + +#ifndef SWIG_FILE_WITH_INIT +#define NO_IMPORT_ARRAY +#endif +#include "stdio.h" +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include + + +#include + + +namespace swig { + template + struct noconst_traits { + typedef Type noconst_type; + }; + + template + struct noconst_traits { + typedef Type noconst_type; + }; + + /* + type categories + */ + struct pointer_category { }; + struct value_category { }; + + /* + General traits that provides type_name and type_info + */ + template struct traits { }; + + template + inline const char* type_name() { + return traits::noconst_type >::type_name(); + } + + template struct traits_info { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name()); + return info; + } + }; + + /* + Partial specialization for pointers (traits_info) + */ + template struct traits_info { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name()); + return info; + } + }; + + template + inline swig_type_info *type_info() { + return traits_info::type_info(); + } + + /* + Partial specialization for pointers (traits) + */ + template struct traits { + typedef pointer_category category; + static std::string make_ptr_name(const char* name) { + std::string ptrname = name; + ptrname += " *"; + return ptrname; + } + static const char* type_name() { + static std::string name = make_ptr_name(swig::type_name()); + return name.c_str(); + } + }; + + template + struct traits_as { }; + + template + struct traits_check { }; + +} + + +namespace swig { + /* + Traits that provides the from method + */ + template struct traits_from_ptr { + static PyObject *from(Type *val, int owner = 0) { + return SWIG_InternalNewPointerObj(val, type_info(), owner); + } + }; + + template struct traits_from { + static PyObject *from(const Type& val) { + return traits_from_ptr::from(new Type(val), 1); + } + }; + + template struct traits_from { + static PyObject *from(Type* val) { + return traits_from_ptr::from(val, 0); + } + }; + + template struct traits_from { + static PyObject *from(const Type* val) { + return traits_from_ptr::from(const_cast(val), 0); + } + }; + + + template + inline PyObject *from(const Type& val) { + return traits_from::from(val); + } + + template + inline PyObject *from_ptr(Type* val, int owner) { + return traits_from_ptr::from(val, owner); + } + + /* + Traits that provides the asval/as/check method + */ + template + struct traits_asptr { + static int asptr(PyObject *obj, Type **val) { + int res = SWIG_ERROR; + swig_type_info *descriptor = type_info(); + if (val) { + Type *p = 0; + int newmem = 0; + res = descriptor ? SWIG_ConvertPtrAndOwn(obj, (void **)&p, descriptor, 0, &newmem) : SWIG_ERROR; + if (SWIG_IsOK(res)) { + if (newmem & SWIG_CAST_NEW_MEMORY) { + res |= SWIG_NEWOBJMASK; + } + *val = p; + } + } else { + res = descriptor ? SWIG_ConvertPtr(obj, 0, descriptor, 0) : SWIG_ERROR; + } + return res; + } + }; + + template + inline int asptr(PyObject *obj, Type **vptr) { + return traits_asptr::asptr(obj, vptr); + } + + template + struct traits_asval { + static int asval(PyObject *obj, Type *val) { + if (val) { + Type *p = 0; + int res = traits_asptr::asptr(obj, &p); + if (!SWIG_IsOK(res)) return res; + if (p) { + typedef typename noconst_traits::noconst_type noconst_type; + *(const_cast(val)) = *p; + if (SWIG_IsNewObj(res)){ + delete p; + res = SWIG_DelNewMask(res); + } + return res; + } else { + return SWIG_ERROR; + } + } else { + return traits_asptr::asptr(obj, (Type **)(0)); + } + } + }; + + template struct traits_asval { + static int asval(PyObject *obj, Type **val) { + if (val) { + typedef typename noconst_traits::noconst_type noconst_type; + noconst_type *p = 0; + int res = traits_asptr::asptr(obj, &p); + if (SWIG_IsOK(res)) { + *(const_cast(val)) = p; + } + return res; + } else { + return traits_asptr::asptr(obj, (Type **)(0)); + } + } + }; + + template + inline int asval(PyObject *obj, Type *val) { + return traits_asval::asval(obj, val); + } + + template + struct traits_as { + static Type as(PyObject *obj) { + Type v; + int res = asval(obj, &v); + if (!obj || !SWIG_IsOK(res)) { + if (!PyErr_Occurred()) { + ::SWIG_Error(SWIG_TypeError, swig::type_name()); + } + throw std::invalid_argument("bad type"); + } + return v; + } + }; + + template + struct traits_as { + static Type as(PyObject *obj) { + Type *v = 0; + int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res) && v) { + if (SWIG_IsNewObj(res)) { + Type r(*v); + delete v; + return r; + } else { + return *v; + } + } else { + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name()); + } + throw std::invalid_argument("bad type"); + } + } + }; + + template + struct traits_as { + static Type* as(PyObject *obj) { + Type *v = 0; + int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res)) { + return v; + } else { + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name()); + } + throw std::invalid_argument("bad type"); + } + } + }; + + template + inline Type as(PyObject *obj) { + return traits_as::category>::as(obj); + } + + template + struct traits_check { + static bool check(PyObject *obj) { + int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; + } + }; + + template + struct traits_check { + static bool check(PyObject *obj) { + int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; + } + }; + + template + inline bool check(PyObject *obj) { + return traits_check::category>::check(obj); + } +} + + +#if defined(__SUNPRO_CC) && defined(_RWSTD_VER) +# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) +# define SWIG_STD_NOITERATOR_TRAITS_STL +# endif +#endif + +#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) +#include +#else +namespace std { + template + struct iterator_traits { + typedef ptrdiff_t difference_type; + typedef typename Iterator::value_type value_type; + }; + + template + struct iterator_traits<__reverse_bi_iterator > { + typedef Distance difference_type; + typedef T value_type; + }; + + template + struct iterator_traits { + typedef T value_type; + typedef ptrdiff_t difference_type; + }; + + template + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) { + ++__first; ++__n; + } + return __n; + } +} +#endif + + +namespace swig { + template + class SwigPyIterator_T : public SwigPyIterator + { + public: + typedef OutIterator out_iterator; + typedef typename std::iterator_traits::value_type value_type; + typedef SwigPyIterator_T self_type; + + SwigPyIterator_T(out_iterator curr, PyObject *seq) + : SwigPyIterator(seq), current(curr) + { + } + + const out_iterator& get_current() const + { + return current; + } + + + bool equal (const SwigPyIterator &iter) const + { + const self_type *iters = dynamic_cast(&iter); + if (iters) { + return (current == iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + ptrdiff_t distance(const SwigPyIterator &iter) const + { + const self_type *iters = dynamic_cast(&iter); + if (iters) { + return std::distance(current, iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + protected: + out_iterator current; + }; + + template + struct from_oper + { + typedef const ValueType& argument_type; + typedef PyObject *result_type; + result_type operator()(argument_type v) const + { + return swig::from(v); + } + }; + + template::value_type, + typename FromOper = from_oper > + class SwigPyForwardIteratorOpen_T : public SwigPyIterator_T + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T base; + typedef SwigPyForwardIteratorOpen_T self_type; + + SwigPyForwardIteratorOpen_T(out_iterator curr, PyObject *seq) + : SwigPyIterator_T(curr, seq) + { + } + + PyObject *value() const { + return from(static_cast(*(base::current))); + } + + SwigPyIterator *copy() const + { + return new self_type(*this); + } + + SwigPyIterator *incr(size_t n = 1) + { + while (n--) { + ++base::current; + } + return this; + } + + }; + + template::value_type, + typename FromOper = from_oper > + class SwigPyIteratorOpen_T : public SwigPyForwardIteratorOpen_T + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T base; + typedef SwigPyIteratorOpen_T self_type; + + SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq) + : SwigPyForwardIteratorOpen_T(curr, seq) + { + } + + SwigPyIterator *decr(size_t n = 1) + { + while (n--) { + --base::current; + } + return this; + } + }; + + template::value_type, + typename FromOper = from_oper > + class SwigPyForwardIteratorClosed_T : public SwigPyIterator_T + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T base; + typedef SwigPyForwardIteratorClosed_T self_type; + + SwigPyForwardIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) + : SwigPyIterator_T(curr, seq), begin(first), end(last) + { + } + + PyObject *value() const { + if (base::current == end) { + throw stop_iteration(); + } else { + return from(static_cast(*(base::current))); + } + } + + SwigPyIterator *copy() const + { + return new self_type(*this); + } + + SwigPyIterator *incr(size_t n = 1) + { + while (n--) { + if (base::current == end) { + throw stop_iteration(); + } else { + ++base::current; + } + } + return this; + } + + protected: + out_iterator begin; + out_iterator end; + }; + + template::value_type, + typename FromOper = from_oper > + class SwigPyIteratorClosed_T : public SwigPyForwardIteratorClosed_T + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef SwigPyIterator_T base; + typedef SwigPyForwardIteratorClosed_T base0; + typedef SwigPyIteratorClosed_T self_type; + + SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) + : SwigPyForwardIteratorClosed_T(curr, first, last, seq) + { + } + + SwigPyIterator *decr(size_t n = 1) + { + while (n--) { + if (base::current == base0::begin) { + throw stop_iteration(); + } else { + --base::current; + } + } + return this; + } + }; + + + template + inline SwigPyIterator* + make_output_forward_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) + { + return new SwigPyForwardIteratorClosed_T(current, begin, end, seq); + } + + template + inline SwigPyIterator* + make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) + { + return new SwigPyIteratorClosed_T(current, begin, end, seq); + } + + template + inline SwigPyIterator* + make_output_forward_iterator(const OutIter& current, PyObject *seq = 0) + { + return new SwigPyForwardIteratorOpen_T(current, seq); + } + + template + inline SwigPyIterator* + make_output_iterator(const OutIter& current, PyObject *seq = 0) + { + return new SwigPyIteratorOpen_T(current, seq); + } + +} + + +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; +} + + +SWIGINTERNINLINE PyObject* + SWIG_From_int (int value) +{ + return PyInt_FromLong((long) value); +} + + +namespace swig { + template <> struct traits< int > { + typedef value_category category; + static const char* type_name() { return"int"; } + }; + template <> struct traits_asval< int > { + typedef int value_type; + static int asval(PyObject *obj, value_type *val) { + return SWIG_AsVal_int (obj, val); + } + }; + template <> struct traits_from< int > { + typedef int value_type; + static PyObject *from(const value_type& val) { + return SWIG_From_int (val); + } + }; +} + + +#include + +namespace std { + template <> + struct less + { + bool + operator()(PyObject * v, PyObject *w) const + { + bool res; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false; + /* This may fall into a case of inconsistent + eg. ObjA > ObjX > ObjB + but ObjA < ObjB + */ + if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) ) + { + /* Objects can't be compared, this mostly occurred in Python 3.0 */ + /* Compare their ptr directly for a workaround */ + res = (v < w); + PyErr_Clear(); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return res; + } + }; + + template <> + struct less + { + bool + operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const + { + return std::less()(v, w); + } + }; + + template <> + struct less + { + bool + operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const + { + return std::less()(v, w); + } + }; + +} + +namespace swig { + template <> struct traits { + typedef value_category category; + static const char* type_name() { return "PyObject *"; } + }; + + template <> struct traits_asval { + typedef PyObject * value_type; + static int asval(PyObject *obj, value_type *val) { + if (val) *val = obj; + return SWIG_OK; + } + }; + + template <> + struct traits_check { + static bool check(PyObject *) { + return true; + } + }; + + template <> struct traits_from { + typedef PyObject * value_type; + static PyObject *from(const value_type& val) { + SWIG_Py_XINCREF(val); + return val; + } + }; + +} + +namespace swig { + template + inline size_t + check_index(Difference i, size_t size, bool insert = false) { + if ( i < 0 ) { + if ((size_t) (-i) <= size) + return (size_t) (i + size); + } else if ( (size_t) i < size ) { + return (size_t) i; + } else if (insert && ((size_t) i == size)) { + return size; + } + throw std::out_of_range("index out of range"); + } + + template + void + slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) { + if (step == 0) { + throw std::invalid_argument("slice step cannot be zero"); + } else if (step > 0) { + // Required range: 0 <= i < size, 0 <= j < size, i <= j + if (i < 0) { + ii = 0; + } else if (i < (Difference)size) { + ii = i; + } else if (insert && (i >= (Difference)size)) { + ii = (Difference)size; + } + if (j < 0) { + jj = 0; + } else { + jj = (j < (Difference)size) ? j : (Difference)size; + } + if (jj < ii) + jj = ii; + } else { + // Required range: -1 <= i < size-1, -1 <= j < size-1, i >= j + if (i < -1) { + ii = -1; + } else if (i < (Difference) size) { + ii = i; + } else if (i >= (Difference)(size-1)) { + ii = (Difference)(size-1); + } + if (j < -1) { + jj = -1; + } else { + jj = (j < (Difference)size ) ? j : (Difference)(size-1); + } + if (ii < jj) + ii = jj; + } + } + + template + inline typename Sequence::iterator + getpos(Sequence* self, Difference i) { + typename Sequence::iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template + inline typename Sequence::const_iterator + cgetpos(const Sequence* self, Difference i) { + typename Sequence::const_iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template + inline void + erase(Sequence* seq, const typename Sequence::iterator& position) { + seq->erase(position); + } + + template + struct traits_reserve { + static void reserve(Sequence & /*seq*/, typename Sequence::size_type /*n*/) { + // This should be specialized for types that support reserve + } + }; + + template + inline Sequence* + getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) { + typename Sequence::size_type size = self->size(); + Difference ii = 0; + Difference jj = 0; + swig::slice_adjust(i, j, step, size, ii, jj); + + if (step > 0) { + typename Sequence::const_iterator sb = self->begin(); + typename Sequence::const_iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + if (step == 1) { + return new Sequence(sb, se); + } else { + Sequence *sequence = new Sequence(); + swig::traits_reserve::reserve(*sequence, (jj - ii + step - 1) / step); + typename Sequence::const_iterator it = sb; + while (it!=se) { + sequence->push_back(*it); + for (Py_ssize_t c=0; c::reserve(*sequence, (ii - jj - step - 1) / -step); + typename Sequence::const_reverse_iterator sb = self->rbegin(); + typename Sequence::const_reverse_iterator se = self->rbegin(); + std::advance(sb,size-ii-1); + std::advance(se,size-jj-1); + typename Sequence::const_reverse_iterator it = sb; + while (it!=se) { + sequence->push_back(*it); + for (Py_ssize_t c=0; c<-step && it!=se; ++c) + it++; + } + return sequence; + } + } + + template + inline void + setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) { + typename Sequence::size_type size = self->size(); + Difference ii = 0; + Difference jj = 0; + swig::slice_adjust(i, j, step, size, ii, jj, true); + if (step > 0) { + if (step == 1) { + size_t ssize = jj - ii; + if (ssize <= is.size()) { + // expanding/staying the same size + swig::traits_reserve::reserve(*self, self->size() - ssize + is.size()); + typename Sequence::iterator sb = self->begin(); + typename InputSeq::const_iterator isit = is.begin(); + std::advance(sb,ii); + std::advance(isit, jj - ii); + self->insert(std::copy(is.begin(), isit, sb), isit, is.end()); + } else { + // shrinking + typename Sequence::iterator sb = self->begin(); + typename Sequence::iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + self->erase(sb,se); + sb = self->begin(); + std::advance(sb,ii); + self->insert(sb, is.begin(), is.end()); + } + } else { + size_t replacecount = (jj - ii + step - 1) / step; + if (is.size() != replacecount) { + char msg[1024]; + PyOS_snprintf(msg, sizeof(msg), "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); + throw std::invalid_argument(msg); + } + typename Sequence::const_iterator isit = is.begin(); + typename Sequence::iterator it = self->begin(); + std::advance(it,ii); + for (size_t rc=0; rcend(); ++rc) { + *it++ = *isit++; + for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c) + it++; + } + } + } else { + size_t replacecount = (ii - jj - step - 1) / -step; + if (is.size() != replacecount) { + char msg[1024]; + PyOS_snprintf(msg, sizeof(msg), "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount); + throw std::invalid_argument(msg); + } + typename Sequence::const_iterator isit = is.begin(); + typename Sequence::reverse_iterator it = self->rbegin(); + std::advance(it,size-ii-1); + for (size_t rc=0; rcrend(); ++rc) { + *it++ = *isit++; + for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c) + it++; + } + } + } + + template + inline void + delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) { + typename Sequence::size_type size = self->size(); + Difference ii = 0; + Difference jj = 0; + swig::slice_adjust(i, j, step, size, ii, jj, true); + if (step > 0) { + typename Sequence::iterator sb = self->begin(); + std::advance(sb,ii); + if (step == 1) { + typename Sequence::iterator se = self->begin(); + std::advance(se,jj); + self->erase(sb,se); + } else { + typename Sequence::iterator it = sb; + size_t delcount = (jj - ii + step - 1) / step; + while (delcount) { + it = self->erase(it); + for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c) + it++; + delcount--; + } + } + } else { + typename Sequence::reverse_iterator sb = self->rbegin(); + std::advance(sb,size-ii-1); + typename Sequence::reverse_iterator it = sb; + size_t delcount = (ii - jj - step - 1) / -step; + while (delcount) { + it = typename Sequence::reverse_iterator(self->erase((++it).base())); + for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c) + it++; + delcount--; + } + } + } +} + + +namespace swig { + template + struct IteratorProtocol { + static void assign(PyObject *obj, Seq *seq) { + SwigVar_PyObject iter = PyObject_GetIter(obj); + if (iter) { + SwigVar_PyObject item = PyIter_Next(iter); + while (item) { + seq->insert(seq->end(), swig::as(item)); + item = PyIter_Next(iter); + } + } + } + + static bool check(PyObject *obj) { + bool ret = false; + SwigVar_PyObject iter = PyObject_GetIter(obj); + if (iter) { + SwigVar_PyObject item = PyIter_Next(iter); + ret = true; + while (item) { + ret = swig::check(item); + item = ret ? PyIter_Next(iter) : 0; + } + } + return ret; + } + }; + + template + struct traits_asptr_stdseq { + typedef Seq sequence; + typedef T value_type; + + static bool is_iterable(PyObject *obj) { + SwigVar_PyObject iter = PyObject_GetIter(obj); + PyErr_Clear(); + return iter != 0; + } + + static int asptr(PyObject *obj, sequence **seq) { + int ret = SWIG_ERROR; + if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) { + sequence *p; + swig_type_info *descriptor = swig::type_info(); + if (descriptor && SWIG_IsOK(::SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0))) { + if (seq) *seq = p; + return SWIG_OLDOBJ; + } + } else if (is_iterable(obj)) { + try { + if (seq) { + *seq = new sequence(); + IteratorProtocol::assign(obj, *seq); + if (!PyErr_Occurred()) + return SWIG_NEWOBJ; + } else { + return IteratorProtocol::check(obj) ? SWIG_OK : SWIG_ERROR; + } + } catch (std::exception& e) { + if (seq && !PyErr_Occurred()) + PyErr_SetString(PyExc_TypeError, e.what()); + } + if (seq) + delete *seq; + return SWIG_ERROR; + } + return ret; + } + }; + + template + struct traits_from_stdseq { + typedef Seq sequence; + typedef T value_type; + typedef typename Seq::size_type size_type; + typedef typename sequence::const_iterator const_iterator; + + static PyObject *from(const sequence& seq) { +#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS + swig_type_info *desc = swig::type_info(); + if (desc && desc->clientdata) { + return SWIG_InternalNewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN); + } +#endif + size_type size = seq.size(); + if (size <= (size_type)INT_MAX) { + PyObject *obj = PyTuple_New((Py_ssize_t)size); + Py_ssize_t i = 0; + for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) { + PyTuple_SetItem(obj,i,swig::from(*it)); + } + return obj; + } else { + PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python"); + return NULL; + } + } + }; +} + + + namespace swig { + template + struct traits_reserve > { + static void reserve(std::vector &seq, typename std::vector::size_type n) { + seq.reserve(n); + } + }; + + template + struct traits_asptr > { + static int asptr(PyObject *obj, std::vector **vec) { + return traits_asptr_stdseq >::asptr(obj, vec); + } + }; + + template + struct traits_from > { + static PyObject *from(const std::vector& vec) { + return traits_from_stdseq >::from(vec); + } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "int" "," "std::allocator< int >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){ + return self->size(); + } + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value)); +} +#endif + + +SWIGINTERNINLINE PyObject * +SWIG_From_size_t (size_t value) +{ +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else { + /* assume sizeof(size_t) <= sizeof(unsigned long long) */ + return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value)); + } +#endif +} + +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< int,std::allocator< int > >()); + } +SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_1(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice,std::vector< int,std::allocator< int > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< int,std::allocator< int > >::difference_type id = i; + std::vector< int,std::allocator< int > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){ + return *(swig::cgetpos(self, i)); + } + +namespace swig { + static PyObject* container_owner_attribute() { + static PyObject* attr = SWIG_Python_str_FromChar("__swig_container"); + return attr; + } + + template + struct container_owner { + // By default, do not add the back-reference (for value types) + // Specialization below will check the reference for pointer types. + static bool back_reference(PyObject* /*child*/, PyObject* /*owner*/) { + return false; + } + }; + + template <> + struct container_owner { + /* + * Call to add a back-reference to the owning object when returning a + * reference from a container. Will only set the reference if child + * is a SWIG wrapper object that does not own the pointer. + * + * returns whether the reference was set or not + */ + static bool back_reference(PyObject* child, PyObject* owner) { + SwigPyObject* swigThis = SWIG_Python_GetSwigThis(child); + if (swigThis && (swigThis->own & SWIG_POINTER_OWN) != SWIG_POINTER_OWN) { + return PyObject_SetAttr(child, container_owner_attribute(), owner) != -1; + } + return false; + } + }; +} + +SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< int,std::allocator< int > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_1(std::vector< int > *self,std::vector< int >::iterator first,std::vector< int >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__insert__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_int_Sg__insert__SWIG_1(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::size_type n,std::vector< int >::value_type const &x){ self->insert(pos, n, x); } + + namespace swig { + template <> struct traits< step_t > { + typedef pointer_category category; + static const char* type_name() { return"step_t"; } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "step_t" "," "std::allocator< step_t >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_step_t_Sg__iterator(std::vector< step_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_step_t_Sg____nonzero__(std::vector< step_t > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_step_t_Sg____bool__(std::vector< step_t > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< step_t >::size_type std_vector_Sl_step_t_Sg____len__(std::vector< step_t > const *self){ + return self->size(); + } +SWIGINTERN std::vector< step_t,std::allocator< step_t > > *std_vector_Sl_step_t_Sg____getslice__(std::vector< step_t > *self,std::vector< step_t >::difference_type i,std::vector< step_t >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_step_t_Sg____setslice____SWIG_0(std::vector< step_t > *self,std::vector< step_t >::difference_type i,std::vector< step_t >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< step_t,std::allocator< step_t > >()); + } +SWIGINTERN void std_vector_Sl_step_t_Sg____setslice____SWIG_1(std::vector< step_t > *self,std::vector< step_t >::difference_type i,std::vector< step_t >::difference_type j,std::vector< step_t,std::allocator< step_t > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_step_t_Sg____delslice__(std::vector< step_t > *self,std::vector< step_t >::difference_type i,std::vector< step_t >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_step_t_Sg____delitem____SWIG_0(std::vector< step_t > *self,std::vector< step_t >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< step_t,std::allocator< step_t > > *std_vector_Sl_step_t_Sg____getitem____SWIG_0(std::vector< step_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< step_t,std::allocator< step_t > >::difference_type id = i; + std::vector< step_t,std::allocator< step_t > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_step_t_Sg____setitem____SWIG_0(std::vector< step_t > *self,SWIGPY_SLICEOBJECT *slice,std::vector< step_t,std::allocator< step_t > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< step_t,std::allocator< step_t > >::difference_type id = i; + std::vector< step_t,std::allocator< step_t > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_step_t_Sg____setitem____SWIG_1(std::vector< step_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< step_t,std::allocator< step_t > >::difference_type id = i; + std::vector< step_t,std::allocator< step_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_step_t_Sg____delitem____SWIG_1(std::vector< step_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< step_t,std::allocator< step_t > >::difference_type id = i; + std::vector< step_t,std::allocator< step_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< step_t >::value_type const &std_vector_Sl_step_t_Sg____getitem____SWIG_1(std::vector< step_t > const *self,std::vector< step_t >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_step_t_Sg____setitem____SWIG_2(std::vector< step_t > *self,std::vector< step_t >::difference_type i,std::vector< step_t >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< step_t >::value_type std_vector_Sl_step_t_Sg__pop(std::vector< step_t > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< step_t,std::allocator< step_t > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_step_t_Sg__append(std::vector< step_t > *self,std::vector< step_t >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< step_t >::iterator std_vector_Sl_step_t_Sg__erase__SWIG_0(std::vector< step_t > *self,std::vector< step_t >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< step_t >::iterator std_vector_Sl_step_t_Sg__erase__SWIG_1(std::vector< step_t > *self,std::vector< step_t >::iterator first,std::vector< step_t >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< step_t >::iterator std_vector_Sl_step_t_Sg__insert__SWIG_0(std::vector< step_t > *self,std::vector< step_t >::iterator pos,std::vector< step_t >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_step_t_Sg__insert__SWIG_1(std::vector< step_t > *self,std::vector< step_t >::iterator pos,std::vector< step_t >::size_type n,std::vector< step_t >::value_type const &x){ self->insert(pos, n, x); } + + namespace swig { + template <> struct traits< tree_key_t > { + typedef pointer_category category; + static const char* type_name() { return"tree_key_t"; } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "tree_key_t" "," "std::allocator< tree_key_t >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_tree_key_t_Sg__iterator(std::vector< tree_key_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_tree_key_t_Sg____nonzero__(std::vector< tree_key_t > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_tree_key_t_Sg____bool__(std::vector< tree_key_t > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< tree_key_t >::size_type std_vector_Sl_tree_key_t_Sg____len__(std::vector< tree_key_t > const *self){ + return self->size(); + } +SWIGINTERN std::vector< tree_key_t,std::allocator< tree_key_t > > *std_vector_Sl_tree_key_t_Sg____getslice__(std::vector< tree_key_t > *self,std::vector< tree_key_t >::difference_type i,std::vector< tree_key_t >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg____setslice____SWIG_0(std::vector< tree_key_t > *self,std::vector< tree_key_t >::difference_type i,std::vector< tree_key_t >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< tree_key_t,std::allocator< tree_key_t > >()); + } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg____setslice____SWIG_1(std::vector< tree_key_t > *self,std::vector< tree_key_t >::difference_type i,std::vector< tree_key_t >::difference_type j,std::vector< tree_key_t,std::allocator< tree_key_t > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg____delslice__(std::vector< tree_key_t > *self,std::vector< tree_key_t >::difference_type i,std::vector< tree_key_t >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg____delitem____SWIG_0(std::vector< tree_key_t > *self,std::vector< tree_key_t >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< tree_key_t,std::allocator< tree_key_t > > *std_vector_Sl_tree_key_t_Sg____getitem____SWIG_0(std::vector< tree_key_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< tree_key_t,std::allocator< tree_key_t > >::difference_type id = i; + std::vector< tree_key_t,std::allocator< tree_key_t > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg____setitem____SWIG_0(std::vector< tree_key_t > *self,SWIGPY_SLICEOBJECT *slice,std::vector< tree_key_t,std::allocator< tree_key_t > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< tree_key_t,std::allocator< tree_key_t > >::difference_type id = i; + std::vector< tree_key_t,std::allocator< tree_key_t > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg____setitem____SWIG_1(std::vector< tree_key_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< tree_key_t,std::allocator< tree_key_t > >::difference_type id = i; + std::vector< tree_key_t,std::allocator< tree_key_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg____delitem____SWIG_1(std::vector< tree_key_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< tree_key_t,std::allocator< tree_key_t > >::difference_type id = i; + std::vector< tree_key_t,std::allocator< tree_key_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< tree_key_t >::value_type const &std_vector_Sl_tree_key_t_Sg____getitem____SWIG_1(std::vector< tree_key_t > const *self,std::vector< tree_key_t >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg____setitem____SWIG_2(std::vector< tree_key_t > *self,std::vector< tree_key_t >::difference_type i,std::vector< tree_key_t >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< tree_key_t >::value_type std_vector_Sl_tree_key_t_Sg__pop(std::vector< tree_key_t > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< tree_key_t,std::allocator< tree_key_t > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg__append(std::vector< tree_key_t > *self,std::vector< tree_key_t >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< tree_key_t >::iterator std_vector_Sl_tree_key_t_Sg__erase__SWIG_0(std::vector< tree_key_t > *self,std::vector< tree_key_t >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< tree_key_t >::iterator std_vector_Sl_tree_key_t_Sg__erase__SWIG_1(std::vector< tree_key_t > *self,std::vector< tree_key_t >::iterator first,std::vector< tree_key_t >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< tree_key_t >::iterator std_vector_Sl_tree_key_t_Sg__insert__SWIG_0(std::vector< tree_key_t > *self,std::vector< tree_key_t >::iterator pos,std::vector< tree_key_t >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_tree_key_t_Sg__insert__SWIG_1(std::vector< tree_key_t > *self,std::vector< tree_key_t >::iterator pos,std::vector< tree_key_t >::size_type n,std::vector< tree_key_t >::value_type const &x){ self->insert(pos, n, x); } + + namespace swig { + template + struct traits_asptr > { + static int asptr(PyObject *obj, std::list **lis) { + return traits_asptr_stdseq >::asptr(obj, lis); + } + }; + + template + struct traits_from > { + static PyObject *from(const std::list& vec) { + return traits_from_stdseq >::from(vec); + } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::list<" "tree_key_t" ", " "std::allocator< tree_key_t >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_list_Sl_tree_key_t_Sg__iterator(std::list< tree_key_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_list_Sl_tree_key_t_Sg____nonzero__(std::list< tree_key_t > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_list_Sl_tree_key_t_Sg____bool__(std::list< tree_key_t > const *self){ + return !(self->empty()); + } +SWIGINTERN std::list< tree_key_t >::size_type std_list_Sl_tree_key_t_Sg____len__(std::list< tree_key_t > const *self){ + return self->size(); + } +SWIGINTERN std::list< tree_key_t,std::allocator< tree_key_t > > *std_list_Sl_tree_key_t_Sg____getslice__(std::list< tree_key_t > *self,std::list< tree_key_t >::difference_type i,std::list< tree_key_t >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_list_Sl_tree_key_t_Sg____setslice____SWIG_0(std::list< tree_key_t > *self,std::list< tree_key_t >::difference_type i,std::list< tree_key_t >::difference_type j){ + swig::setslice(self, i, j, 1, std::list< tree_key_t,std::allocator< tree_key_t > >()); + } +SWIGINTERN void std_list_Sl_tree_key_t_Sg____setslice____SWIG_1(std::list< tree_key_t > *self,std::list< tree_key_t >::difference_type i,std::list< tree_key_t >::difference_type j,std::list< tree_key_t,std::allocator< tree_key_t > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_list_Sl_tree_key_t_Sg____delslice__(std::list< tree_key_t > *self,std::list< tree_key_t >::difference_type i,std::list< tree_key_t >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_list_Sl_tree_key_t_Sg____delitem____SWIG_0(std::list< tree_key_t > *self,std::list< tree_key_t >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::list< tree_key_t,std::allocator< tree_key_t > > *std_list_Sl_tree_key_t_Sg____getitem____SWIG_0(std::list< tree_key_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::list< tree_key_t,std::allocator< tree_key_t > >::difference_type id = i; + std::list< tree_key_t,std::allocator< tree_key_t > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_list_Sl_tree_key_t_Sg____setitem____SWIG_0(std::list< tree_key_t > *self,SWIGPY_SLICEOBJECT *slice,std::list< tree_key_t,std::allocator< tree_key_t > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::list< tree_key_t,std::allocator< tree_key_t > >::difference_type id = i; + std::list< tree_key_t,std::allocator< tree_key_t > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_list_Sl_tree_key_t_Sg____setitem____SWIG_1(std::list< tree_key_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::list< tree_key_t,std::allocator< tree_key_t > >::difference_type id = i; + std::list< tree_key_t,std::allocator< tree_key_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_list_Sl_tree_key_t_Sg____delitem____SWIG_1(std::list< tree_key_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::list< tree_key_t,std::allocator< tree_key_t > >::difference_type id = i; + std::list< tree_key_t,std::allocator< tree_key_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::list< tree_key_t >::value_type const &std_list_Sl_tree_key_t_Sg____getitem____SWIG_1(std::list< tree_key_t > const *self,std::list< tree_key_t >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_list_Sl_tree_key_t_Sg____setitem____SWIG_2(std::list< tree_key_t > *self,std::list< tree_key_t >::difference_type i,std::list< tree_key_t >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::list< tree_key_t >::value_type std_list_Sl_tree_key_t_Sg__pop(std::list< tree_key_t > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::list< tree_key_t,std::allocator< tree_key_t > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_list_Sl_tree_key_t_Sg__append(std::list< tree_key_t > *self,std::list< tree_key_t >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::list< tree_key_t >::iterator std_list_Sl_tree_key_t_Sg__erase__SWIG_0(std::list< tree_key_t > *self,std::list< tree_key_t >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::list< tree_key_t >::iterator std_list_Sl_tree_key_t_Sg__erase__SWIG_1(std::list< tree_key_t > *self,std::list< tree_key_t >::iterator first,std::list< tree_key_t >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::list< tree_key_t >::iterator std_list_Sl_tree_key_t_Sg__insert__SWIG_0(std::list< tree_key_t > *self,std::list< tree_key_t >::iterator pos,std::list< tree_key_t >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_list_Sl_tree_key_t_Sg__insert__SWIG_1(std::list< tree_key_t > *self,std::list< tree_key_t >::iterator pos,std::list< tree_key_t >::size_type n,std::list< tree_key_t >::value_type const &x){ self->insert(pos, n, x); } + + namespace swig { + template <> struct traits< edge_t > { + typedef pointer_category category; + static const char* type_name() { return"edge_t"; } + }; + } + + + namespace swig { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + template + struct traits_asptr > { + typedef std::pair value_type; + + static int get_pair(PyObject* first, PyObject* second, + std::pair **val) + { + if (val) { + value_type *vp = (new std::pair()); + T *pfirst = &(vp->first); + int res1 = swig::asval((PyObject*)first, pfirst); + if (!SWIG_IsOK(res1)) { + delete vp; + return res1; + } + U *psecond = &(vp->second); + int res2 = swig::asval((PyObject*)second, psecond); + if (!SWIG_IsOK(res2)) { + delete vp; + return res2; + } + *val = vp; + return SWIG_AddNewMask(res1 > res2 ? res1 : res2); + } else { + T *pfirst = 0; + int res1 = swig::asval((PyObject*)first, pfirst); + if (!SWIG_IsOK(res1)) return res1; + U *psecond = 0; + int res2 = swig::asval((PyObject*)second, psecond); + if (!SWIG_IsOK(res2)) return res2; + return res1 > res2 ? res1 : res2; + } + } + + static int asptr(PyObject *obj, std::pair **val) { + int res = SWIG_ERROR; + if (PyTuple_Check(obj)) { + if (PyTuple_GET_SIZE(obj) == 2) { + res = get_pair(PyTuple_GET_ITEM(obj,0),PyTuple_GET_ITEM(obj,1), val); + } + } else if (PySequence_Check(obj)) { + if (PySequence_Size(obj) == 2) { + swig::SwigVar_PyObject first = PySequence_GetItem(obj,0); + swig::SwigVar_PyObject second = PySequence_GetItem(obj,1); + res = get_pair(first, second, val); + } + } else { + value_type *p = 0; + swig_type_info *descriptor = swig::type_info(); + res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; + if (SWIG_IsOK(res) && val) *val = p; + } + return res; + } + }; + + + template + struct traits_from > { + static PyObject *from(const std::pair& val) { + PyObject* obj = PyTuple_New(2); + PyTuple_SetItem(obj,0,swig::from(val.first)); + PyTuple_SetItem(obj,1,swig::from(val.second)); + return obj; + } + }; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + namespace swig { + template <> struct traits > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "tree_key_t" "," "edge_t" " >"; + } + }; + } + + + namespace swig { + template + struct from_key_oper + { + typedef const ValueType& argument_type; + typedef PyObject *result_type; + result_type operator()(argument_type v) const + { + return swig::from(v.first); + } + }; + + template + struct from_value_oper + { + typedef const ValueType& argument_type; + typedef PyObject *result_type; + result_type operator()(argument_type v) const + { + return swig::from(v.second); + } + }; + + template + struct SwigPyMapIterator_T : SwigPyIteratorClosed_T + { + SwigPyMapIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq) + : SwigPyIteratorClosed_T(curr, first, last, seq) + { + } + }; + + + template > + struct SwigPyMapKeyIterator_T : SwigPyMapIterator_T + { + SwigPyMapKeyIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq) + : SwigPyMapIterator_T(curr, first, last, seq) + { + } + }; + + template + inline SwigPyIterator* + make_output_key_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, PyObject *seq = 0) + { + return new SwigPyMapKeyIterator_T(current, begin, end, seq); + } + + template > + struct SwigPyMapValueIterator_T : SwigPyMapIterator_T + { + SwigPyMapValueIterator_T(OutIterator curr, OutIterator first, OutIterator last, PyObject *seq) + : SwigPyMapIterator_T(curr, first, last, seq) + { + } + }; + + + template + inline SwigPyIterator* + make_output_value_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, PyObject *seq = 0) + { + return new SwigPyMapValueIterator_T(current, begin, end, seq); + } + } + + + namespace swig { + template + struct traits_asptr > { + typedef std::map map_type; + static int asptr(PyObject *obj, map_type **val) { + int res = SWIG_ERROR; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (PyDict_Check(obj)) { + SwigVar_PyObject items = PyObject_CallMethod(obj,(char *)"items",NULL); +#if PY_VERSION_HEX >= 0x03000000 + /* In Python 3.x the ".items()" method returns a dict_items object */ + items = PySequence_Fast(items, ".items() didn't return a sequence!"); +#endif + res = traits_asptr_stdseq >::asptr(items, val); + } else { + map_type *p = 0; + swig_type_info *descriptor = swig::type_info(); + res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR; + if (SWIG_IsOK(res) && val) *val = p; + } + SWIG_PYTHON_THREAD_END_BLOCK; + return res; + } + }; + + template + struct traits_from > { + typedef std::map map_type; + typedef typename map_type::const_iterator const_iterator; + typedef typename map_type::size_type size_type; + + static PyObject *asdict(const map_type& map) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + size_type size = map.size(); + Py_ssize_t pysize = (size <= (size_type) INT_MAX) ? (Py_ssize_t) size : -1; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject *obj = PyDict_New(); + for (const_iterator i= map.begin(); i!= map.end(); ++i) { + swig::SwigVar_PyObject key = swig::from(i->first); + swig::SwigVar_PyObject val = swig::from(i->second); + PyDict_SetItem(obj, key, val); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return obj; + } + + static PyObject *from(const map_type& map) { + swig_type_info *desc = swig::type_info(); + if (desc && desc->clientdata) { + return SWIG_InternalNewPointerObj(new map_type(map), desc, SWIG_POINTER_OWN); + } else { + return asdict(map); + } + } + }; + } + + + namespace swig { + template <> struct traits, std::allocator< std::pair< tree_key_t const,edge_t > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "tree_key_t" "," "edge_t" "," "std::less< tree_key_t >" "," "std::allocator< std::pair< tree_key_t const,edge_t > >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_map_Sl_tree_key_t_Sc_edge_t_Sg__iterator(std::map< tree_key_t,edge_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_map_Sl_tree_key_t_Sc_edge_t_Sg____nonzero__(std::map< tree_key_t,edge_t > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_map_Sl_tree_key_t_Sc_edge_t_Sg____bool__(std::map< tree_key_t,edge_t > const *self){ + return !(self->empty()); + } +SWIGINTERN std::map< tree_key_t,edge_t >::size_type std_map_Sl_tree_key_t_Sc_edge_t_Sg____len__(std::map< tree_key_t,edge_t > const *self){ + return self->size(); + } +SWIGINTERN std::map< tree_key_t,edge_t >::mapped_type const &std_map_Sl_tree_key_t_Sc_edge_t_Sg____getitem__(std::map< tree_key_t,edge_t > *self,std::map< tree_key_t,edge_t >::key_type const &key){ + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::const_iterator i = self->find(key); + if (i != self->end()) + return i->second; + else + throw std::out_of_range("key not found"); + } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_edge_t_Sg____delitem__(std::map< tree_key_t,edge_t > *self,std::map< tree_key_t,edge_t >::key_type const &key){ + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::iterator i = self->find(key); + if (i != self->end()) + self->erase(i); + else + throw std::out_of_range("key not found"); + } +SWIGINTERN bool std_map_Sl_tree_key_t_Sc_edge_t_Sg__has_key(std::map< tree_key_t,edge_t > const *self,std::map< tree_key_t,edge_t >::key_type const &key){ + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN PyObject *std_map_Sl_tree_key_t_Sc_edge_t_Sg__keys(std::map< tree_key_t,edge_t > *self){ + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* keyList = PyList_New(pysize); + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(keyList, j, swig::from(i->first)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return keyList; + } +SWIGINTERN PyObject *std_map_Sl_tree_key_t_Sc_edge_t_Sg__values(std::map< tree_key_t,edge_t > *self){ + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* valList = PyList_New(pysize); + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(valList, j, swig::from(i->second)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return valList; + } +SWIGINTERN PyObject *std_map_Sl_tree_key_t_Sc_edge_t_Sg__items(std::map< tree_key_t,edge_t > *self){ + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* itemList = PyList_New(pysize); + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(itemList, j, swig::from(*i)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return itemList; + } +SWIGINTERN bool std_map_Sl_tree_key_t_Sc_edge_t_Sg____contains__(std::map< tree_key_t,edge_t > *self,std::map< tree_key_t,edge_t >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_tree_key_t_Sc_edge_t_Sg__key_iterator(std::map< tree_key_t,edge_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_tree_key_t_Sc_edge_t_Sg__value_iterator(std::map< tree_key_t,edge_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_edge_t_Sg____setitem____SWIG_0(std::map< tree_key_t,edge_t > *self,std::map< tree_key_t,edge_t >::key_type const &key){ + self->erase(key); + } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_edge_t_Sg____setitem____SWIG_1(std::map< tree_key_t,edge_t > *self,std::map< tree_key_t,edge_t >::key_type const &key,std::map< tree_key_t,edge_t >::mapped_type const &x){ +#ifdef __cpp_lib_map_try_emplace + (*self).insert_or_assign(key, x); +#else + (*self)[key] = x; +#endif + } +SWIGINTERN PyObject *std_map_Sl_tree_key_t_Sc_edge_t_Sg__asdict(std::map< tree_key_t,edge_t > *self){ + return swig::traits_from< std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > > >::asdict(*self); + } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_edge_t_Sg__erase__SWIG_1(std::map< tree_key_t,edge_t > *self,std::map< tree_key_t,edge_t >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_edge_t_Sg__erase__SWIG_2(std::map< tree_key_t,edge_t > *self,std::map< tree_key_t,edge_t >::iterator first,std::map< tree_key_t,edge_t >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits< node_t > { + typedef pointer_category category; + static const char* type_name() { return"node_t"; } + }; + } + + + namespace swig { + template <> struct traits > { + typedef pointer_category category; + static const char* type_name() { + return "std::pair<" "tree_key_t" "," "node_t" " >"; + } + }; + } + + + namespace swig { + template <> struct traits, std::allocator< std::pair< tree_key_t const,node_t > > > > { + typedef pointer_category category; + static const char* type_name() { + return "std::map<" "tree_key_t" "," "node_t" "," "std::less< tree_key_t >" "," "std::allocator< std::pair< tree_key_t const,node_t > >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_map_Sl_tree_key_t_Sc_node_t_Sg__iterator(std::map< tree_key_t,node_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_map_Sl_tree_key_t_Sc_node_t_Sg____nonzero__(std::map< tree_key_t,node_t > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_map_Sl_tree_key_t_Sc_node_t_Sg____bool__(std::map< tree_key_t,node_t > const *self){ + return !(self->empty()); + } +SWIGINTERN std::map< tree_key_t,node_t >::size_type std_map_Sl_tree_key_t_Sc_node_t_Sg____len__(std::map< tree_key_t,node_t > const *self){ + return self->size(); + } +SWIGINTERN std::map< tree_key_t,node_t >::mapped_type const &std_map_Sl_tree_key_t_Sc_node_t_Sg____getitem__(std::map< tree_key_t,node_t > *self,std::map< tree_key_t,node_t >::key_type const &key){ + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::const_iterator i = self->find(key); + if (i != self->end()) + return i->second; + else + throw std::out_of_range("key not found"); + } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_node_t_Sg____delitem__(std::map< tree_key_t,node_t > *self,std::map< tree_key_t,node_t >::key_type const &key){ + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::iterator i = self->find(key); + if (i != self->end()) + self->erase(i); + else + throw std::out_of_range("key not found"); + } +SWIGINTERN bool std_map_Sl_tree_key_t_Sc_node_t_Sg__has_key(std::map< tree_key_t,node_t > const *self,std::map< tree_key_t,node_t >::key_type const &key){ + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::const_iterator i = self->find(key); + return i != self->end(); + } +SWIGINTERN PyObject *std_map_Sl_tree_key_t_Sc_node_t_Sg__keys(std::map< tree_key_t,node_t > *self){ + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* keyList = PyList_New(pysize); + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(keyList, j, swig::from(i->first)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return keyList; + } +SWIGINTERN PyObject *std_map_Sl_tree_key_t_Sc_node_t_Sg__values(std::map< tree_key_t,node_t > *self){ + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* valList = PyList_New(pysize); + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(valList, j, swig::from(i->second)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return valList; + } +SWIGINTERN PyObject *std_map_Sl_tree_key_t_Sc_node_t_Sg__items(std::map< tree_key_t,node_t > *self){ + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::size_type size = self->size(); + Py_ssize_t pysize = (size <= (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::size_type) INT_MAX) ? (Py_ssize_t) size : -1; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (pysize < 0) { + PyErr_SetString(PyExc_OverflowError, "map size not valid in python"); + SWIG_PYTHON_THREAD_END_BLOCK; + return NULL; + } + PyObject* itemList = PyList_New(pysize); + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >::const_iterator i = self->begin(); + for (Py_ssize_t j = 0; j < pysize; ++i, ++j) { + PyList_SET_ITEM(itemList, j, swig::from(*i)); + } + SWIG_PYTHON_THREAD_END_BLOCK; + return itemList; + } +SWIGINTERN bool std_map_Sl_tree_key_t_Sc_node_t_Sg____contains__(std::map< tree_key_t,node_t > *self,std::map< tree_key_t,node_t >::key_type const &key){ + return self->find(key) != self->end(); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_tree_key_t_Sc_node_t_Sg__key_iterator(std::map< tree_key_t,node_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_key_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN swig::SwigPyIterator *std_map_Sl_tree_key_t_Sc_node_t_Sg__value_iterator(std::map< tree_key_t,node_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_value_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_node_t_Sg____setitem____SWIG_0(std::map< tree_key_t,node_t > *self,std::map< tree_key_t,node_t >::key_type const &key){ + self->erase(key); + } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_node_t_Sg____setitem____SWIG_1(std::map< tree_key_t,node_t > *self,std::map< tree_key_t,node_t >::key_type const &key,std::map< tree_key_t,node_t >::mapped_type const &x){ +#ifdef __cpp_lib_map_try_emplace + (*self).insert_or_assign(key, x); +#else + (*self)[key] = x; +#endif + } +SWIGINTERN PyObject *std_map_Sl_tree_key_t_Sc_node_t_Sg__asdict(std::map< tree_key_t,node_t > *self){ + return swig::traits_from< std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > > >::asdict(*self); + } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_node_t_Sg__erase__SWIG_1(std::map< tree_key_t,node_t > *self,std::map< tree_key_t,node_t >::iterator position){ self->erase(position); } +SWIGINTERN void std_map_Sl_tree_key_t_Sc_node_t_Sg__erase__SWIG_2(std::map< tree_key_t,node_t > *self,std::map< tree_key_t,node_t >::iterator first,std::map< tree_key_t,node_t >::iterator last){ self->erase(first, last); } + + namespace swig { + template <> struct traits< poly_t > { + typedef pointer_category category; + static const char* type_name() { return"poly_t"; } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "poly_t" "," "std::allocator< poly_t >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_poly_t_Sg__iterator(std::vector< poly_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_poly_t_Sg____nonzero__(std::vector< poly_t > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_poly_t_Sg____bool__(std::vector< poly_t > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< poly_t >::size_type std_vector_Sl_poly_t_Sg____len__(std::vector< poly_t > const *self){ + return self->size(); + } +SWIGINTERN std::vector< poly_t,std::allocator< poly_t > > *std_vector_Sl_poly_t_Sg____getslice__(std::vector< poly_t > *self,std::vector< poly_t >::difference_type i,std::vector< poly_t >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_poly_t_Sg____setslice____SWIG_0(std::vector< poly_t > *self,std::vector< poly_t >::difference_type i,std::vector< poly_t >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< poly_t,std::allocator< poly_t > >()); + } +SWIGINTERN void std_vector_Sl_poly_t_Sg____setslice____SWIG_1(std::vector< poly_t > *self,std::vector< poly_t >::difference_type i,std::vector< poly_t >::difference_type j,std::vector< poly_t,std::allocator< poly_t > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_poly_t_Sg____delslice__(std::vector< poly_t > *self,std::vector< poly_t >::difference_type i,std::vector< poly_t >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_poly_t_Sg____delitem____SWIG_0(std::vector< poly_t > *self,std::vector< poly_t >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< poly_t,std::allocator< poly_t > > *std_vector_Sl_poly_t_Sg____getitem____SWIG_0(std::vector< poly_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< poly_t,std::allocator< poly_t > >::difference_type id = i; + std::vector< poly_t,std::allocator< poly_t > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_poly_t_Sg____setitem____SWIG_0(std::vector< poly_t > *self,SWIGPY_SLICEOBJECT *slice,std::vector< poly_t,std::allocator< poly_t > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< poly_t,std::allocator< poly_t > >::difference_type id = i; + std::vector< poly_t,std::allocator< poly_t > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_poly_t_Sg____setitem____SWIG_1(std::vector< poly_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< poly_t,std::allocator< poly_t > >::difference_type id = i; + std::vector< poly_t,std::allocator< poly_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_poly_t_Sg____delitem____SWIG_1(std::vector< poly_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< poly_t,std::allocator< poly_t > >::difference_type id = i; + std::vector< poly_t,std::allocator< poly_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< poly_t >::value_type const &std_vector_Sl_poly_t_Sg____getitem____SWIG_1(std::vector< poly_t > const *self,std::vector< poly_t >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_poly_t_Sg____setitem____SWIG_2(std::vector< poly_t > *self,std::vector< poly_t >::difference_type i,std::vector< poly_t >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< poly_t >::value_type std_vector_Sl_poly_t_Sg__pop(std::vector< poly_t > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< poly_t,std::allocator< poly_t > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_poly_t_Sg__append(std::vector< poly_t > *self,std::vector< poly_t >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< poly_t >::iterator std_vector_Sl_poly_t_Sg__erase__SWIG_0(std::vector< poly_t > *self,std::vector< poly_t >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< poly_t >::iterator std_vector_Sl_poly_t_Sg__erase__SWIG_1(std::vector< poly_t > *self,std::vector< poly_t >::iterator first,std::vector< poly_t >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< poly_t >::iterator std_vector_Sl_poly_t_Sg__insert__SWIG_0(std::vector< poly_t > *self,std::vector< poly_t >::iterator pos,std::vector< poly_t >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_poly_t_Sg__insert__SWIG_1(std::vector< poly_t > *self,std::vector< poly_t >::iterator pos,std::vector< poly_t >::size_type n,std::vector< poly_t >::value_type const &x){ self->insert(pos, n, x); } + + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "node_t" "," "std::allocator< node_t >" " >"; + } + }; + } + +SWIGINTERN swig::SwigPyIterator *std_vector_Sl_node_t_Sg__iterator(std::vector< node_t > *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_node_t_Sg____nonzero__(std::vector< node_t > const *self){ + return !(self->empty()); + } +SWIGINTERN bool std_vector_Sl_node_t_Sg____bool__(std::vector< node_t > const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector< node_t >::size_type std_vector_Sl_node_t_Sg____len__(std::vector< node_t > const *self){ + return self->size(); + } +SWIGINTERN std::vector< node_t,std::allocator< node_t > > *std_vector_Sl_node_t_Sg____getslice__(std::vector< node_t > *self,std::vector< node_t >::difference_type i,std::vector< node_t >::difference_type j){ + return swig::getslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_node_t_Sg____setslice____SWIG_0(std::vector< node_t > *self,std::vector< node_t >::difference_type i,std::vector< node_t >::difference_type j){ + swig::setslice(self, i, j, 1, std::vector< node_t,std::allocator< node_t > >()); + } +SWIGINTERN void std_vector_Sl_node_t_Sg____setslice____SWIG_1(std::vector< node_t > *self,std::vector< node_t >::difference_type i,std::vector< node_t >::difference_type j,std::vector< node_t,std::allocator< node_t > > const &v){ + swig::setslice(self, i, j, 1, v); + } +SWIGINTERN void std_vector_Sl_node_t_Sg____delslice__(std::vector< node_t > *self,std::vector< node_t >::difference_type i,std::vector< node_t >::difference_type j){ + swig::delslice(self, i, j, 1); + } +SWIGINTERN void std_vector_Sl_node_t_Sg____delitem____SWIG_0(std::vector< node_t > *self,std::vector< node_t >::difference_type i){ + swig::erase(self, swig::getpos(self, i)); + } +SWIGINTERN std::vector< node_t,std::allocator< node_t > > *std_vector_Sl_node_t_Sg____getitem____SWIG_0(std::vector< node_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return NULL; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< node_t,std::allocator< node_t > >::difference_type id = i; + std::vector< node_t,std::allocator< node_t > >::difference_type jd = j; + return swig::getslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_node_t_Sg____setitem____SWIG_0(std::vector< node_t > *self,SWIGPY_SLICEOBJECT *slice,std::vector< node_t,std::allocator< node_t > > const &v){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< node_t,std::allocator< node_t > >::difference_type id = i; + std::vector< node_t,std::allocator< node_t > >::difference_type jd = j; + swig::setslice(self, id, jd, step, v); + } +SWIGINTERN void std_vector_Sl_node_t_Sg____setitem____SWIG_1(std::vector< node_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< node_t,std::allocator< node_t > >::difference_type id = i; + std::vector< node_t,std::allocator< node_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN void std_vector_Sl_node_t_Sg____delitem____SWIG_1(std::vector< node_t > *self,SWIGPY_SLICEOBJECT *slice){ + Py_ssize_t i, j, step; + if( !PySlice_Check(slice) ) { + SWIG_Error(SWIG_TypeError, "Slice object expected."); + return; + } + PySlice_GetIndices(slice, (Py_ssize_t)self->size(), &i, &j, &step); + std::vector< node_t,std::allocator< node_t > >::difference_type id = i; + std::vector< node_t,std::allocator< node_t > >::difference_type jd = j; + swig::delslice(self, id, jd, step); + } +SWIGINTERN std::vector< node_t >::value_type const &std_vector_Sl_node_t_Sg____getitem____SWIG_1(std::vector< node_t > const *self,std::vector< node_t >::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_node_t_Sg____setitem____SWIG_2(std::vector< node_t > *self,std::vector< node_t >::difference_type i,std::vector< node_t >::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN std::vector< node_t >::value_type std_vector_Sl_node_t_Sg__pop(std::vector< node_t > *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector< node_t,std::allocator< node_t > >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN void std_vector_Sl_node_t_Sg__append(std::vector< node_t > *self,std::vector< node_t >::value_type const &x){ + self->push_back(x); + } +SWIGINTERN std::vector< node_t >::iterator std_vector_Sl_node_t_Sg__erase__SWIG_0(std::vector< node_t > *self,std::vector< node_t >::iterator pos){ return self->erase(pos); } +SWIGINTERN std::vector< node_t >::iterator std_vector_Sl_node_t_Sg__erase__SWIG_1(std::vector< node_t > *self,std::vector< node_t >::iterator first,std::vector< node_t >::iterator last){ return self->erase(first, last); } +SWIGINTERN std::vector< node_t >::iterator std_vector_Sl_node_t_Sg__insert__SWIG_0(std::vector< node_t > *self,std::vector< node_t >::iterator pos,std::vector< node_t >::value_type const &x){ return self->insert(pos, x); } +SWIGINTERN void std_vector_Sl_node_t_Sg__insert__SWIG_1(std::vector< node_t > *self,std::vector< node_t >::iterator pos,std::vector< node_t >::size_type n,std::vector< node_t >::value_type const &x){ self->insert(pos, n, x); } + + #define SWIG_From_double PyFloat_FromDouble + +SWIGINTERN char const *index_value_pair_t___str__(index_value_pair_t *self){ + static char buffer[255]; + sprintf(buffer,"index: %u, val: %.2e", (unsigned int)self->index, + self->val); + return &buffer[0]; +} + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static swig_type_info* info = 0; + if (!info) { + info = SWIG_TypeQuery("_p_char"); + } + return info; +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { +#if PY_VERSION_HEX >= 0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#else + return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); +#endif +#else + return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); +#endif + } + } else { + return SWIG_Py_Void(); + } +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + +SWIGINTERN char const *index_value_pair_t___repr__(index_value_pair_t *self){ + static char buffer[255]; + sprintf(buffer,"(%u, %.2e)", (unsigned int)self->index, self->val); + return &buffer[0]; +} + +/* Macros to extract array attributes. + */ +#if NPY_API_VERSION < 0x00000007 +#define is_array(a) ((a) && PyArray_Check((PyArrayObject*)a)) +#define array_type(a) (int)(PyArray_TYPE((PyArrayObject*)a)) +#define array_numdims(a) (((PyArrayObject*)a)->nd) +#define array_dimensions(a) (((PyArrayObject*)a)->dimensions) +#define array_size(a,i) (((PyArrayObject*)a)->dimensions[i]) +#define array_strides(a) (((PyArrayObject*)a)->strides) +#define array_stride(a,i) (((PyArrayObject*)a)->strides[i]) +#define array_data(a) (((PyArrayObject*)a)->data) +#define array_descr(a) (((PyArrayObject*)a)->descr) +#define array_flags(a) (((PyArrayObject*)a)->flags) +#define array_clearflags(a,f) (((PyArrayObject*)a)->flags) &= ~f +#define array_enableflags(a,f) (((PyArrayObject*)a)->flags) = f +#define array_is_fortran(a) (PyArray_ISFORTRAN((PyArrayObject*)a)) +#else +#define is_array(a) ((a) && PyArray_Check(a)) +#define array_type(a) PyArray_TYPE((PyArrayObject*)a) +#define array_numdims(a) PyArray_NDIM((PyArrayObject*)a) +#define array_dimensions(a) PyArray_DIMS((PyArrayObject*)a) +#define array_strides(a) PyArray_STRIDES((PyArrayObject*)a) +#define array_stride(a,i) PyArray_STRIDE((PyArrayObject*)a,i) +#define array_size(a,i) PyArray_DIM((PyArrayObject*)a,i) +#define array_data(a) PyArray_DATA((PyArrayObject*)a) +#define array_descr(a) PyArray_DESCR((PyArrayObject*)a) +#define array_flags(a) PyArray_FLAGS((PyArrayObject*)a) +#define array_enableflags(a,f) PyArray_ENABLEFLAGS((PyArrayObject*)a,f) +#define array_clearflags(a,f) PyArray_CLEARFLAGS((PyArrayObject*)a,f) +#define array_is_fortran(a) (PyArray_IS_F_CONTIGUOUS((PyArrayObject*)a)) +#endif +#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS((PyArrayObject*)a)) +#define array_is_native(a) (PyArray_ISNOTSWAPPED((PyArrayObject*)a)) + +SWIGINTERN char const *genotype_value_pair_t___str__(genotype_value_pair_t *self){ + static char buffer[255]; + unsigned long L = (self->genotype).size(); + if(L > 2) + sprintf(buffer,"genotype: %d...%d, val: %.2e", + (int)(self->genotype)[0], + (int)(self->genotype)[L-1], + self->val); + else if(L == 2) + sprintf(buffer,"genotype: %d%d, val: %.2e", + (int)(self->genotype)[0], + (int)(self->genotype)[1], + self->val); + else if(L == 1) + sprintf(buffer,"genotype: %d, val: %.2e", + (int)(self->genotype)[0], + self->val); + else + sprintf(buffer,"genotype: (empty), val: %.2e", + self->val); + return &buffer[0]; +} +SWIGINTERN char const *genotype_value_pair_t___repr__(genotype_value_pair_t *self){ + static char buffer[255]; + unsigned long L = (self->genotype).size(); + if(L > 2) + sprintf(buffer,"([%d, ..., %d], %.2e)", + (int)(self->genotype)[0], + (int)(self->genotype)[L-1], + self->val); + else if(L == 2) + sprintf(buffer,"([%d, %d], %.2e)", + (int)(self->genotype)[0], + (int)(self->genotype)[1], + self->val); + else if(L == 1) + sprintf(buffer,"([%d], %.2e)", + (int)(self->genotype)[0], + self->val); + else + sprintf(buffer,"([], %.2e)", self->val); + return &buffer[0]; +} +SWIGINTERN char const *stat_t___str__(stat_t *self){ + static char buffer[255]; + sprintf(buffer,"mean: %e, variance: %e", self->mean, self->variance); + return &buffer[0]; +} +SWIGINTERN char const *stat_t___repr__(stat_t *self){ + static char buffer[255]; + sprintf(buffer,"(%e, %e)", self->mean, self->variance); + return &buffer[0]; +} + +const int haploid_lowd_L_get(haploid_lowd *h) { + return (const int) h->get_number_of_loci(); +} +const int haploid_lowd_number_of_loci_get(haploid_lowd *h) { + return (const int) h->get_number_of_loci(); +} + +const int haploid_lowd_N_get(haploid_lowd *h) { + return (const int) h->get_population_size(); +} +const int haploid_lowd_population_size_get(haploid_lowd *h) { + return (const int) h->get_population_size(); +} + +int haploid_lowd_generation_get(haploid_lowd *h) { + return (const int) h->get_generation(); +} +void haploid_lowd_generation_set(haploid_lowd *h, int g) { + h->set_generation(g); +} + + +SWIGINTERN int +SWIG_AsVal_bool (PyObject *obj, bool *val) +{ + int r; + if (!PyBool_Check(obj)) + return SWIG_ERROR; + r = PyObject_IsTrue(obj); + if (r == -1) + return SWIG_ERROR; + if (val) *val = r ? true : false; + return SWIG_OK; +} + + +#if NPY_API_VERSION < 0x00000007 +#define NPY_ARRAY_DEFAULT NPY_DEFAULT +#define NPY_ARRAY_FARRAY NPY_FARRAY +#define NPY_FORTRANORDER NPY_FORTRAN +#endif + + + /* Given a PyObject, return a string describing its type. + */ + const char* pytype_string(PyObject* py_obj) + { + if (py_obj == NULL ) return "C NULL value"; + if (py_obj == Py_None ) return "Python None" ; + if (PyCallable_Check(py_obj)) return "callable" ; + if (PyBytes_Check( py_obj)) return "string" ; + if (PyLong_Check( py_obj)) return "int" ; + if (PyFloat_Check( py_obj)) return "float" ; + if (PyDict_Check( py_obj)) return "dict" ; + if (PyList_Check( py_obj)) return "list" ; + if (PyTuple_Check( py_obj)) return "tuple" ; + + return "unknown type"; + } + + /* Given a NumPy typecode, return a string describing the type. + */ + const char* typecode_string(int typecode) + { + static const char* type_names[25] = {"bool", + "byte", + "unsigned byte", + "short", + "unsigned short", + "int", + "unsigned int", + "long", + "unsigned long", + "long long", + "unsigned long long", + "float", + "double", + "long double", + "complex float", + "complex double", + "complex long double", + "object", + "string", + "unicode", + "void", + "ntypes", + "notype", + "char", + "unknown"}; + return typecode < 24 ? type_names[typecode] : type_names[24]; + } + + /* Make sure input has correct numpy type. This now just calls + PyArray_EquivTypenums(). + */ + int type_match(int actual_type, + int desired_type) + { + return PyArray_EquivTypenums(actual_type, desired_type); + } + +#ifdef SWIGPY_USE_CAPSULE + void free_cap(PyObject * cap) + { + void* array = (void*) PyCapsule_GetPointer(cap,SWIGPY_CAPSULE_NAME); + if (array != NULL) free(array); + } +#endif + + + + + /* Given a PyObject pointer, cast it to a PyArrayObject pointer if + * legal. If not, set the python error string appropriately and + * return NULL. + */ + PyArrayObject* obj_to_array_no_conversion(PyObject* input, + int typecode) + { + PyArrayObject* ary = NULL; + if (is_array(input) && (typecode == NPY_NOTYPE || + PyArray_EquivTypenums(array_type(input), typecode))) + { + ary = (PyArrayObject*) input; + } + else if is_array(input) + { + const char* desired_type = typecode_string(typecode); + const char* actual_type = typecode_string(array_type(input)); + PyErr_Format(PyExc_TypeError, + "Array of type '%s' required. Array of type '%s' given", + desired_type, actual_type); + ary = NULL; + } + else + { + const char* desired_type = typecode_string(typecode); + const char* actual_type = pytype_string(input); + PyErr_Format(PyExc_TypeError, + "Array of type '%s' required. A '%s' was given", + desired_type, + actual_type); + ary = NULL; + } + return ary; + } + + /* Convert the given PyObject to a NumPy array with the given + * typecode. On success, return a valid PyArrayObject* with the + * correct type. On failure, the python error string will be set and + * the routine returns NULL. + */ + PyArrayObject* obj_to_array_allow_conversion(PyObject* input, + int typecode, + int* is_new_object) + { + PyArrayObject* ary = NULL; + PyObject* py_obj; + if (is_array(input) && (typecode == NPY_NOTYPE || + PyArray_EquivTypenums(array_type(input),typecode))) + { + ary = (PyArrayObject*) input; + *is_new_object = 0; + } + else + { + py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_ARRAY_DEFAULT); + /* If NULL, PyArray_FromObject will have set python error value.*/ + ary = (PyArrayObject*) py_obj; + *is_new_object = 1; + } + return ary; + } + + /* Given a PyArrayObject, check to see if it is contiguous. If so, + * return the input pointer and flag it as not a new object. If it is + * not contiguous, create a new PyArrayObject using the original data, + * flag it as a new object and return the pointer. + */ + PyArrayObject* make_contiguous(PyArrayObject* ary, + int* is_new_object, + int min_dims, + int max_dims) + { + PyArrayObject* result; + if (array_is_contiguous(ary)) + { + result = ary; + *is_new_object = 0; + } + else + { + result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary, + array_type(ary), + min_dims, + max_dims); + *is_new_object = 1; + } + return result; + } + + /* Given a PyArrayObject, check to see if it is Fortran-contiguous. + * If so, return the input pointer, but do not flag it as not a new + * object. If it is not Fortran-contiguous, create a new + * PyArrayObject using the original data, flag it as a new object + * and return the pointer. + */ + PyArrayObject* make_fortran(PyArrayObject* ary, + int* is_new_object) + { + PyArrayObject* result; + if (array_is_fortran(ary)) + { + result = ary; + *is_new_object = 0; + } + else + { + Py_INCREF(array_descr(ary)); + result = (PyArrayObject*) PyArray_FromArray(ary, + array_descr(ary), +#if NPY_API_VERSION < 0x00000007 + NPY_FORTRANORDER); +#else + NPY_ARRAY_F_CONTIGUOUS); +#endif + *is_new_object = 1; + } + return result; + } + + /* Convert a given PyObject to a contiguous PyArrayObject of the + * specified type. If the input object is not a contiguous + * PyArrayObject, a new one will be created and the new object flag + * will be set. + */ + PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, + int typecode, + int* is_new_object) + { + int is_new1 = 0; + int is_new2 = 0; + PyArrayObject* ary2; + PyArrayObject* ary1 = obj_to_array_allow_conversion(input, + typecode, + &is_new1); + if (ary1) + { + ary2 = make_contiguous(ary1, &is_new2, 0, 0); + if ( is_new1 && is_new2) + { + Py_DECREF(ary1); + } + ary1 = ary2; + } + *is_new_object = is_new1 || is_new2; + return ary1; + } + + /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the + * specified type. If the input object is not a Fortran-ordered + * PyArrayObject, a new one will be created and the new object flag + * will be set. + */ + PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input, + int typecode, + int* is_new_object) + { + int is_new1 = 0; + int is_new2 = 0; + PyArrayObject* ary2; + PyArrayObject* ary1 = obj_to_array_allow_conversion(input, + typecode, + &is_new1); + if (ary1) + { + ary2 = make_fortran(ary1, &is_new2); + if (is_new1 && is_new2) + { + Py_DECREF(ary1); + } + ary1 = ary2; + } + *is_new_object = is_new1 || is_new2; + return ary1; + } + + + /* Test whether a python object is contiguous. If array is + * contiguous, return 1. Otherwise, set the python error string and + * return 0. + */ + int require_contiguous(PyArrayObject* ary) + { + int contiguous = 1; + if (!array_is_contiguous(ary)) + { + PyErr_SetString(PyExc_TypeError, + "Array must be contiguous. A non-contiguous array was given"); + contiguous = 0; + } + return contiguous; + } + + /* Test whether a python object is (C_ or F_) contiguous. If array is + * contiguous, return 1. Otherwise, set the python error string and + * return 0. + */ + int require_c_or_f_contiguous(PyArrayObject* ary) + { + int contiguous = 1; + if (!(array_is_contiguous(ary) || array_is_fortran(ary))) + { + PyErr_SetString(PyExc_TypeError, + "Array must be contiguous (C_ or F_). A non-contiguous array was given"); + contiguous = 0; + } + return contiguous; + } + + /* Require that a numpy array is not byte-swapped. If the array is + * not byte-swapped, return 1. Otherwise, set the python error string + * and return 0. + */ + int require_native(PyArrayObject* ary) + { + int native = 1; + if (!array_is_native(ary)) + { + PyErr_SetString(PyExc_TypeError, + "Array must have native byteorder. " + "A byte-swapped array was given"); + native = 0; + } + return native; + } + + /* Require the given PyArrayObject to have a specified number of + * dimensions. If the array has the specified number of dimensions, + * return 1. Otherwise, set the python error string and return 0. + */ + int require_dimensions(PyArrayObject* ary, + int exact_dimensions) + { + int success = 1; + if (array_numdims(ary) != exact_dimensions) + { + PyErr_Format(PyExc_TypeError, + "Array must have %d dimensions. Given array has %d dimensions", + exact_dimensions, + array_numdims(ary)); + success = 0; + } + return success; + } + + /* Require the given PyArrayObject to have one of a list of specified + * number of dimensions. If the array has one of the specified number + * of dimensions, return 1. Otherwise, set the python error string + * and return 0. + */ + int require_dimensions_n(PyArrayObject* ary, + int* exact_dimensions, + int n) + { + int success = 0; + int i; + char dims_str[255] = ""; + char s[255]; + for (i = 0; i < n && !success; i++) + { + if (array_numdims(ary) == exact_dimensions[i]) + { + success = 1; + } + } + if (!success) + { + for (i = 0; i < n-1; i++) + { + sprintf(s, "%d, ", exact_dimensions[i]); + strcat(dims_str,s); + } + sprintf(s, " or %d", exact_dimensions[n-1]); + strcat(dims_str,s); + PyErr_Format(PyExc_TypeError, + "Array must have %s dimensions. Given array has %d dimensions", + dims_str, + array_numdims(ary)); + } + return success; + } + + /* Require the given PyArrayObject to have a specified shape. If the + * array has the specified shape, return 1. Otherwise, set the python + * error string and return 0. + */ + int require_size(PyArrayObject* ary, + npy_intp* size, + int n) + { + int i; + int success = 1; + size_t len; + char desired_dims[255] = "["; + char s[255]; + char actual_dims[255] = "["; + for(i=0; i < n;i++) + { + if (size[i] != -1 && size[i] != array_size(ary,i)) + { + success = 0; + } + } + if (!success) + { + for (i = 0; i < n; i++) + { + if (size[i] == -1) + { + sprintf(s, "*,"); + } + else + { + sprintf(s, "%ld,", (long int)size[i]); + } + strcat(desired_dims,s); + } + len = strlen(desired_dims); + desired_dims[len-1] = ']'; + for (i = 0; i < n; i++) + { + sprintf(s, "%ld,", (long int)array_size(ary,i)); + strcat(actual_dims,s); + } + len = strlen(actual_dims); + actual_dims[len-1] = ']'; + PyErr_Format(PyExc_TypeError, + "Array must have shape of %s. Given array has shape of %s", + desired_dims, + actual_dims); + } + return success; + } + + /* Require the given PyArrayObject to be Fortran ordered. If the + * the PyArrayObject is already Fortran ordered, do nothing. Else, + * set the Fortran ordering flag and recompute the strides. + */ + int require_fortran(PyArrayObject* ary) + { + int success = 1; + int nd = array_numdims(ary); + int i; + npy_intp * strides = array_strides(ary); + if (array_is_fortran(ary)) return success; + int n_non_one = 0; + /* Set the Fortran ordered flag */ + const npy_intp *dims = array_dimensions(ary); + for (i=0; i < nd; ++i) + n_non_one += (dims[i] != 1) ? 1 : 0; + if (n_non_one > 1) + array_clearflags(ary,NPY_ARRAY_CARRAY); + array_enableflags(ary,NPY_ARRAY_FARRAY); + /* Recompute the strides */ + strides[0] = strides[nd-1]; + for (i=1; i < nd; ++i) + strides[i] = strides[i-1] * array_size(ary,i-1); + return success; + } + + + +SWIGINTERN char const *haploid_lowd___str__(haploid_lowd *self){ + static char buffer[255]; + sprintf(buffer,"haploid_lowd: L = %d, N = %f", (int)self->L(), self->N()); + return &buffer[0]; +} +SWIGINTERN char const *haploid_lowd___repr__(haploid_lowd *self){ + static char buffer[255]; + sprintf(buffer,"", (int)self->L(), self->N()); + return &buffer[0]; +} +SWIGINTERN int haploid_lowd__set_genotypes(haploid_lowd *self,int len1,double *indices,int len2,double *vals){ + vector gt; + index_value_pair_t temp; + for(size_t i = 0; i != (size_t)len1; i++) { + temp.index = (int)indices[i]; + temp.val = vals[i]; + gt.push_back(temp); + } + return self->set_genotypes(gt); +} +SWIGINTERN int haploid_lowd__set_mutation_rates(haploid_lowd *self,double *IN_ARRAY2,int DIM1,int DIM2){ + double ** mrs = new double*[2]; + for(size_t i = 0; i < 2; i++) + mrs[i] = &(IN_ARRAY2[DIM2 * i]); + int result = self->set_mutation_rates(mrs); + delete[] mrs; + return result; +} +SWIGINTERN void haploid_lowd_get_fitnesses(haploid_lowd *self,int DIM1,double *ARGOUT_ARRAY1){ + for(size_t i=0; i < (size_t)DIM1; i++) + ARGOUT_ARRAY1[i] = self->get_fitness(i); +} +SWIGINTERN void haploid_lowd_get_fitness_coefficients(haploid_lowd *self,int DIM1,double *ARGOUT_ARRAY1){ + for(size_t i=0; i < (size_t)DIM1; i++) + ARGOUT_ARRAY1[i] = self->get_fitness_coefficient(i); +} +SWIGINTERN int haploid_lowd__set_fitness_func(haploid_lowd *self,int len1,double *indices,int len2,double *vals){ + vector iv; + index_value_pair_t temp; + for(size_t i = 0; i != (size_t)len1; i++) { + temp.index = (int)indices[i]; + temp.val = vals[i]; + iv.push_back(temp); + } + return (self->fitness).init_list(iv); +} +SWIGINTERN int haploid_lowd__set_fitness_coeff(haploid_lowd *self,int len1,double *indices,int len2,double *vals){ + vector iv; + index_value_pair_t temp; + for(size_t i = 0; i != (size_t)len1; i++) { + temp.index = (int)indices[i]; + temp.val = vals[i]; + iv.push_back(temp); + } + return (self->fitness).init_coeff_list(iv); +} +SWIGINTERN void haploid_lowd_set_fitness_additive(haploid_lowd *self,int DIM1,double *IN_ARRAY1){ + if(DIM1 != self->L()) + PyErr_Format(PyExc_ValueError, "The array had a wrong length."); + if ((self->fitness).additive(IN_ARRAY1)) + PyErr_Format(PyExc_RuntimeError, "Error in the C++ function."); +} + +const int clone_t_number_of_traits_get(clone_t *c) { + return (const int) c->trait.size(); +} + + +const int haploid_highd_L_get(haploid_highd *h) { + return (const int) h->get_number_of_loci(); +} +const int haploid_highd_number_of_loci_get(haploid_highd *h) { + return (const int) h->get_number_of_loci(); +} + +const int haploid_highd_N_get(haploid_highd *h) { + return (const int) h->get_population_size(); +} +const int haploid_highd_population_size_get(haploid_highd *h) { + return (const int) h->get_population_size(); +} + +int haploid_highd_generation_get(haploid_highd *h) { + return (const int) h->get_generation(); +} +void haploid_highd_generation_set(haploid_highd *h, int g) { + h->set_generation(g); +} + +const int haploid_highd_number_of_clones_get(haploid_highd *h) { + return (const int) h->get_number_of_clones(); +} + +const int haploid_highd_number_of_traits_get(haploid_highd *h) { + return (const int) h->get_number_of_traits(); +} + +const double haploid_highd_max_fitness_get(haploid_highd *h) { + return (const double) h->get_max_fitness(); +} + +const double haploid_highd_participation_ratio_get(haploid_highd *h) { + return (const double) h->get_participation_ratio(); +} + +const bool haploid_highd_all_polymorphic_get(haploid_highd *h) { + return (const bool) h->get_all_polymorphic(); +} + +void haploid_highd_all_polymorphic_set(haploid_highd *h, bool all_polymorphic) { + h->set_all_polymorphic(all_polymorphic); +} + + +SWIGINTERN char const *clone_t___str__(clone_t *self){ + static char buffer[255]; + sprintf(buffer,"clone: %u traits, genome size = %u", + (unsigned int)(self->trait).size(), + (unsigned int)(self->genotype).size()); + return &buffer[0]; +} +SWIGINTERN char const *clone_t___repr__(clone_t *self){ + static char buffer[255]; + sprintf(buffer,""); + return &buffer[0]; +} +SWIGINTERN void clone_t__get_trait(clone_t *self,int DIM1,double *ARGOUT_ARRAY1){ + for(size_t i=0; i < (size_t)DIM1; i++) + ARGOUT_ARRAY1[i] = (self->trait)[i]; +} +SWIGINTERN char const *tree_key_t___str__(tree_key_t *self){ + static char buffer[255]; + sprintf(buffer,"tree key: index = %d, age = %d", (int)(self->index), (int)(self->age)); + return &buffer[0]; +} +SWIGINTERN char const *tree_key_t___repr__(tree_key_t *self){ + static char buffer[255]; + sprintf(buffer,"tree_key(%d, %d)", (int)(self->index), (int)(self->age)); + return &buffer[0]; +} +SWIGINTERN long const tree_key_t___hash__(tree_key_t *self){ + return (long)((self->index) * RT_VERYLARGE + (self->age)); +} +SWIGINTERN char const *step_t___str__(step_t *self){ + static char buffer[255]; + sprintf(buffer,"tree_step: pos = %d, step = %d", (int)(self->pos), (int)(self->step)); + return &buffer[0]; +} +SWIGINTERN char const *step_t___repr__(step_t *self){ + static char buffer[255]; + sprintf(buffer,"tree_step(%d, %d)", (int)(self->pos), (int)(self->step)); + return &buffer[0]; +} +SWIGINTERN long const step_t___hash__(step_t *self){ + return (long)((self->pos) * RT_VERYLARGE + (self->step)); +} +SWIGINTERN char const *node_t___str__(node_t *self){ + static char buffer[255]; + sprintf(buffer,"tree_node"); + return &buffer[0]; +} +SWIGINTERN char const *node_t___repr__(node_t *self){ + static char buffer[255]; + sprintf(buffer,""); + return &buffer[0]; +} +SWIGINTERN int node_t__get_crossover_chunk(node_t *self,int i){return (self->crossover)[i];} +SWIGINTERN void node_t__set_crossover_chunk(node_t *self,int value,int i){(self->crossover)[i] = value;} +SWIGINTERN char const *edge_t___str__(edge_t *self){ + static char buffer[255]; + sprintf(buffer,"tree_edge"); + return &buffer[0]; +} +SWIGINTERN char const *edge_t___repr__(edge_t *self){ + static char buffer[255]; + sprintf(buffer,""); + return &buffer[0]; +} +SWIGINTERN int edge_t__get_segment_chunk(edge_t *self,int i){return (self->segment)[i];} +SWIGINTERN char const *poly_t___str__(poly_t *self){ + static char buffer[255]; + sprintf(buffer,"polymorphism: birth = %d, sweep time = %d, effect = %f, fitness = %f, fitness variance = %f", + (int)(self->birth), + (int)(self->sweep_time), + (double)(self->effect), + (double)(self->fitness), + (double)(self->fitness_variance)); + return &buffer[0]; +} +SWIGINTERN char const *poly_t___repr__(poly_t *self){ + static char buffer[255]; + sprintf(buffer,"polymorphism(b=%d, age=%d, e=%f, f=%f, fvar=%f)", + (int)(self->birth), + (int)(self->sweep_time), + (double)(self->effect), + (double)(self->fitness), + (double)(self->fitness_variance)); + return &buffer[0]; +} + +SWIGINTERNINLINE PyObject * +SWIG_From_std_string (const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + +/* Return string from Python obj. NOTE: obj must remain in scope in order + to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) +{ +#if PY_VERSION_HEX>=0x03000000 +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_Check(obj)) +#else + if (PyUnicode_Check(obj)) +#endif +#else + if (PyString_Check(obj)) +#endif + { + char *cstr; Py_ssize_t len; + PyObject *bytes = NULL; + int ret = SWIG_OK; + if (alloc) + *alloc = SWIG_OLDOBJ; +#if PY_VERSION_HEX>=0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR) + if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) + return SWIG_TypeError; +#else + cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes); + if (!cstr) + return SWIG_TypeError; + /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */ + if (bytes && cptr) { + if (alloc) { + cstr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); + *alloc = SWIG_NEWOBJ; + } else { + /* alloc must be set in order to clean up allocated memory */ + return SWIG_RuntimeError; + } + } +#endif + if (cptr) *cptr = cstr; + if (psize) *psize = len + 1; + SWIG_Py_XDECREF(bytes); + return ret; + } else { +#if defined(SWIG_PYTHON_2_UNICODE) +#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) +#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" +#endif +#if PY_VERSION_HEX<0x03000000 + if (PyUnicode_Check(obj)) { + char *cstr; Py_ssize_t len; + if (!alloc && cptr) { + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + if (!obj) + return SWIG_TypeError; + if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { + if (cptr) { + if (alloc) *alloc = SWIG_NEWOBJ; + *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); + } + if (psize) *psize = len + 1; + + SWIG_Py_XDECREF(obj); + return SWIG_OK; + } else { + SWIG_Py_XDECREF(obj); + } + } +#endif +#endif + + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsPtr_std_string (PyObject * obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + PyErr_Clear(); + static swig_type_info *descriptor = SWIG_TypeQuery("std::string" " *"); + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + +SWIGINTERN char const *rooted_tree___str__(rooted_tree *self){ + static char buffer[255]; + sprintf(buffer,"genealogy tree with %u nodes", (unsigned int)(self->nodes).size()); + return &buffer[0]; +} +SWIGINTERN char const *rooted_tree___repr__(rooted_tree *self){ + static char buffer[255]; + sprintf(buffer,"", (unsigned int)(self->nodes).size()); + return &buffer[0]; +} +SWIGINTERN vector< tree_key_t > rooted_tree__ancestors_at_age(rooted_tree *self,int age,tree_key_t subtree_root){ + vector ancestors; + self->ancestors_at_age(age, subtree_root, ancestors); + return ancestors; +} +SWIGINTERN rooted_tree rooted_tree_create_subtree_from_keys(rooted_tree *self,vector< tree_key_t > leaves){ + rooted_tree other; + self->construct_subtree(leaves, other); + return other; +} +SWIGINTERN char const *multi_locus_genealogy___str__(multi_locus_genealogy *self){ + static char buffer[255]; + sprintf(buffer,"multi_locus_genealogy for %u loci", (unsigned int)(self->loci).size()); + return &buffer[0]; +} +SWIGINTERN char const *multi_locus_genealogy___repr__(multi_locus_genealogy *self){ + static char buffer[255]; + sprintf(buffer,"", (unsigned int)(self->loci).size()); + return &buffer[0]; +} +SWIGINTERN int multi_locus_genealogy__get_number_of_loci(multi_locus_genealogy *self){ + return (self->loci).size(); +} +SWIGINTERN void multi_locus_genealogy__get_loci(multi_locus_genealogy *self,int DIM1,int *ARGOUT_ARRAY1){ + for(size_t i = 0; i < (self->loci).size(); i++) + ARGOUT_ARRAY1[i] = (self->loci)[i]; +} +SWIGINTERN rooted_tree multi_locus_genealogy_get_tree(multi_locus_genealogy *self,int locus){ + vector::iterator index; + index = std::find((self->loci).begin(), (self->loci).end(), locus); + if(index == (self->loci).end()) { + throw (int)RT_LOCUSNOTFOUND; + } else + return (self->trees)[(int)(index - (self->loci).begin())]; +} +SWIGINTERN void multi_locus_genealogy__set_tree(multi_locus_genealogy *self,int locus,rooted_tree &tree){ + vector::iterator index; + index = std::find((self->loci).begin(), (self->loci).end(), locus); + if(index == (self->loci).end()) { + throw (int)RT_LOCUSNOTFOUND; + } else + (self->trees)[(int)(index - (self->loci).begin())] = tree; +} +SWIGINTERN vector< node_t > multi_locus_genealogy__get_newGeneration(multi_locus_genealogy *self,int locus){ + int i = 0; + for(vector< vector >::iterator it=self->newGenerations.begin(); it != self->newGenerations.end(); it++, i++) { + if (self->loci[i] == locus) { + return self->newGenerations[i]; + } + } + throw (int)RT_LOCUSNOTFOUND; +} +SWIGINTERN void multi_locus_genealogy__set_newGeneration(multi_locus_genealogy *self,int locus,vector< node_t > newGeneration){ + int i = 0; + for(vector< vector >::iterator it=self->newGenerations.begin(); it != self->newGenerations.end(); it++, i++) { + if ((self->loci)[i] == locus) { + (self->newGenerations)[i] = newGeneration; + return; + } + } + throw (int)RT_LOCUSNOTFOUND; +} + +SWIGINTERNINLINE PyObject* + SWIG_From_unsigned_SS_int (unsigned int value) +{ + return PyInt_FromSize_t((size_t) value); +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; +} + +SWIGINTERN char const *haploid_highd___str__(haploid_highd *self){ + static char buffer[255]; + sprintf(buffer,"haploid_highd: L = %d, N = %d", self->L(), self->N()); + return &buffer[0]; +} +SWIGINTERN char const *haploid_highd___repr__(haploid_highd *self){ + static char buffer[255]; + sprintf(buffer,"", self->L(), self->N()); + return &buffer[0]; +} +SWIGINTERN clone_t haploid_highd_get_clone(haploid_highd *self,unsigned long n){ + return self->population.at(n); + +} +SWIGINTERN void haploid_highd__set_trait_weights(haploid_highd *self,double *IN_ARRAY1,int DIM1){ + /* call the C++ method */ + self->set_trait_weights(IN_ARRAY1); + self->update_fitness(); +} +SWIGINTERN void haploid_highd__get_trait_weights(haploid_highd *self,double *ARGOUT_ARRAY1,int DIM1){ + /* check trait number */ + if(DIM1 != self->get_number_of_traits()) + throw HP_BADARG; + + /* set the output array */ + for(size_t t=0; t < (size_t)DIM1; t++) + ARGOUT_ARRAY1[t] = self->get_trait_weight(t); +} +SWIGINTERN int haploid_highd_set_genotypes(haploid_highd *self,int len1,double *genotypes,int len2,double *counts){ + /* We use a flattened array */ + len1 /= len2; + vector gt; + genotype_value_pair_t temp; + for(size_t i = 0; i != (size_t)len2; i++) { + temp.genotype = boost::dynamic_bitset<>(len1); + for(size_t j=0; j < (size_t)len1; j++) + temp.genotype[j] = (bool)genotypes[i * len1 + j]; + temp.val = counts[i]; + gt.push_back(temp); + } + return self->set_genotypes(gt); +} +SWIGINTERN int haploid_highd_set_genotypes_and_ancestral_state(haploid_highd *self,int len1,double *genotypes,int len2,double *counts,int len3,double *anc_state){ + /* We use a flattened array */ + len1 /= len2; + vector gt; + genotype_value_pair_t temp; + for(size_t i = 0; i != (size_t)len2; i++) { + temp.genotype = boost::dynamic_bitset<>(len1); + for(size_t j=0; j < (size_t)len1; j++) + temp.genotype[j] = (bool)genotypes[i * len1 + j]; + temp.val = counts[i]; + gt.push_back(temp); + } + vector ancestral_state(self->L(), 0); + for (size_t locus=0; locusset_genotypes_and_ancestral_state(gt, ancestral_state); +} +SWIGINTERN multi_locus_genealogy haploid_highd__get_genealogy(haploid_highd *self){ + return self->genealogy; +} +SWIGINTERN void haploid_highd_get_allele_frequencies(haploid_highd *self,double *ARGOUT_ARRAY1,int DIM1){ + for(size_t i=0; i < (size_t)self->get_number_of_loci(); i++) + ARGOUT_ARRAY1[i] = self->get_allele_frequency(i); +} +SWIGINTERN void haploid_highd_get_derived_allele_frequencies(haploid_highd *self,double *ARGOUT_ARRAY1,int DIM1){ + if (self->get_all_polymorphic()){ + for(size_t i=0; i < (size_t)self->get_number_of_loci(); i++) + ARGOUT_ARRAY1[i] = self->get_derived_allele_frequency(i); + } +} +SWIGINTERN void haploid_highd_get_ancestral_states(haploid_highd *self,double *ARGOUT_ARRAY1,int DIM1){ + for(size_t i=0; i < (size_t)self->get_number_of_loci(); i++) + ARGOUT_ARRAY1[i] = self->get_ancestral_state(i); +} +SWIGINTERN void haploid_highd_get_trait_additive(haploid_highd *self,double *ARGOUT_ARRAY1,int DIM1,int t=0){ + /* Initialize to zero */ + for(size_t i=0; i < (size_t)DIM1; i++) + ARGOUT_ARRAY1[i] = 0; + + /* Add any coefficient you found */ + hypercube_highd *trait = &((self->trait)[t]); + coeff_single_locus_t * coeff; + for(size_t i=0; i < trait->coefficients_single_locus.size(); i++) { + coeff = &(trait->coefficients_single_locus[i]); + ARGOUT_ARRAY1[coeff->locus] += coeff->value; + } +} +SWIGINTERN void haploid_highd_set_trait_additive(haploid_highd *self,int DIM1,double *IN_ARRAY1,int t=0){ + /* reset trait landscape */ + self->trait[t].reset_additive(); + + /* set the new coefficients */ + vector loci(1,0); + for(size_t i = 0; i < (size_t)DIM1; i++) { + if(abs(IN_ARRAY1[i]) > HP_NOTHING) { + loci[0] = i; + self->add_trait_coefficient(IN_ARRAY1[i], loci, t); + } + } + + /* update the population */ + self->update_traits(); + self->update_fitness(); +} +SWIGINTERN void haploid_highd_set_fitness_additive(haploid_highd *self,int DIM1,double *IN_ARRAY1){ + /* reset trait landscape */ + self->trait[0].reset_additive(); + + /* set the new coefficients */ + vector loci(1,0); + for(size_t i = 0; i < (size_t)DIM1; i++) { + if(abs(IN_ARRAY1[i]) > HP_NOTHING) { + loci[0] = i; + self->add_trait_coefficient(IN_ARRAY1[i], loci, 0); + } + } + + /* update the population */ + self->update_traits(); + self->update_fitness(); +} +SWIGINTERN boost::dynamic_bitset< > haploid_highd_get_genotype(haploid_highd *self,int n){ + return self->population[n].genotype; +} +SWIGINTERN void haploid_highd__set_tree_in_genealogy(haploid_highd *self,int locus,rooted_tree tree){ + multi_locus_genealogy* own_genealogy = &(self->genealogy); + vector::iterator index; + index = std::find((own_genealogy->loci).begin(), (own_genealogy->loci).end(), locus); + if(index == (own_genealogy->loci).end()) { + throw (int)RT_LOCUSNOTFOUND; + } else + (own_genealogy->trees)[(int)(index - (own_genealogy->loci).begin())] = tree; +} +SWIGINTERN void haploid_highd__set_newGeneration_in_genealogy(haploid_highd *self,int locus,vector< node_t > newGeneration){ + multi_locus_genealogy* own_genealogy = &(self->genealogy); + int i = 0; + for(vector< vector >::iterator it=own_genealogy->newGenerations.begin(); it != own_genealogy->newGenerations.end(); it++, i++) { + if ((own_genealogy->loci)[i] == locus) { + (own_genealogy->newGenerations)[i] = newGeneration; + return; + } + } + throw (int)RT_LOCUSNOTFOUND; +} + +double hivpopulation_treatment_get(hivpopulation *h) { + return (double) h->get_treatment(); +} +void hivpopulation_treatment_set(hivpopulation *h, double t) { + h->set_treatment(t); +} + +SWIGINTERN char const *hivgene___str__(hivgene *self){ + static char buffer[255]; + if(self->second_start + self->second_end) + sprintf(buffer,"hivgene: start 1st exon: %d, end 1st exon: %d, start 2nd exon: %d, end 2nd exon: %d", + self->start, self->end, self->second_start, self->second_end); + else + sprintf(buffer,"hivgene: start: %d, end: %d", self->start, self->end); + return &buffer[0]; +} +SWIGINTERN char const *hivgene___repr__(hivgene *self){ + static char buffer[255]; + if(self->second_start + self->second_end) + sprintf(buffer,"hivgene(%d, %d, %d, %d)", self->start, self->end, self->second_start, self->second_end); + else + sprintf(buffer,"hivgene(%d, %d)", self->start, self->end); + return &buffer[0]; +} +SWIGINTERN char const *hivpopulation___str__(hivpopulation *self){ + static char buffer[255]; + sprintf(buffer,"hivpopulation: N = %d", self->N()); + return &buffer[0]; +} +SWIGINTERN char const *hivpopulation___repr__(hivpopulation *self){ + static char buffer[255]; + sprintf(buffer,"", self->N()); + return &buffer[0]; +} +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + size_t arg2 = (size_t) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:SwigPyIterator_incr", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + } + try { + result = (swig::SwigPyIterator *)(arg1)->incr(SWIG_STD_MOVE(arg2)); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + size_t arg2 = (size_t) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:SwigPyIterator_decr", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + } + try { + result = (swig::SwigPyIterator *)(arg1)->decr(SWIG_STD_MOVE(arg2)); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + ptrdiff_t result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:SwigPyIterator_distance", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + try { + result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); + } catch(std::invalid_argument &_e) { + SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; + } + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:SwigPyIterator_equal", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + try { + result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); + } catch(std::invalid_argument &_e) { + SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)(arg1)->next(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)(arg1)->__next__(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + try { + result = (PyObject *)(arg1)->previous(); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:SwigPyIterator_advance", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *)(arg1)->advance(SWIG_STD_MOVE(arg2)); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:SwigPyIterator___eq__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:SwigPyIterator___ne__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:SwigPyIterator___iadd__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *) &(arg1)->operator +=(SWIG_STD_MOVE(arg2)); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:SwigPyIterator___isub__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *) &(arg1)->operator -=(SWIG_STD_MOVE(arg2)); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + swig::SwigPyIterator *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:SwigPyIterator___add__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(SWIG_STD_MOVE(arg2)); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + swig::SwigPyIterator *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(SWIG_STD_MOVE(arg2)); + } catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + ptrdiff_t result; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "SwigPyIterator___sub__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_SwigPyIterator___sub____SWIG_1(self, argc, argv); + case 2: + return _wrap_SwigPyIterator___sub____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap__intVector_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_iterator" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___nonzero__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___bool__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___bool__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)std_vector_Sl_int_Sg____bool__((std::vector< int > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___len__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___len__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___getslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + std::vector< int,std::allocator< int > > *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:_intVector___getslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_intVector___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___setslice____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_intVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___setslice____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + std::vector< int,std::allocator< int > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_intVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "_intVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "_intVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_int_Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< int,std::allocator< int > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "_intVector___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[3], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap__intVector___setslice____SWIG_0(self, argc, argv); + case 2: + return _wrap__intVector___setslice____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function '_intVector___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type)\n" + " std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type,std::vector< int,std::allocator< int > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap__intVector___delslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:_intVector___delslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_intVector___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + } + arg3 = static_cast< std::vector< int >::difference_type >(val3); + try { + std_vector_Sl_int_Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___delitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + try { + std_vector_Sl_int_Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int,std::allocator< int > > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___getitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + std::vector< int,std::allocator< int > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "_intVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "_intVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_int_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< int,std::allocator< int > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "_intVector___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap__intVector___delitem____SWIG_1(self, argc, argv); + case 2: + return _wrap__intVector___delitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function '_intVector___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__delitem__(std::vector< int >::difference_type)\n" + " std::vector< int >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap__intVector___getitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + try { + result = (std::vector< int >::value_type *) &std_vector_Sl_int_Sg____getitem____SWIG_1((std::vector< int > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_From_int(static_cast< int >(*result)); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "_intVector___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap__intVector___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap__intVector___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function '_intVector___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap__intVector___setitem____SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + } + arg2 = static_cast< std::vector< int >::difference_type >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_intVector___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + try { + std_vector_Sl_int_Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(int const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "_intVector___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[2], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap__intVector___setitem____SWIG_1(self, argc, argv); + case 2: + return _wrap__intVector___setitem____SWIG_0(self, argc, argv); + case 3: + return _wrap__intVector___setitem____SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function '_intVector___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< int,std::allocator< int > > const &)\n" + " std::vector< int >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap__intVector_pop(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::value_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + try { + result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_append(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:_intVector_append", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_append" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new__intVector__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< int > *result = 0 ; + + (void)self; + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< int > *)new std::vector< int >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new__intVector__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< int > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new__intVector" "', argument " "1"" of type '" "std::vector< int > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new__intVector" "', argument " "1"" of type '" "std::vector< int > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_empty(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_empty" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)((std::vector< int > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_size(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_size" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_swap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"v", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:_intVector_swap", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_swap" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_intVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "_intVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); + } + arg2 = reinterpret_cast< std::vector< int > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_begin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_begin" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_end(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_end" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_rbegin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_rbegin" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_rend(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_rend" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_clear(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_get_allocator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< int > > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new__intVector__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< int > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new__intVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); + } + arg1 = static_cast< std::vector< int >::size_type >(val1); + result = (std::vector< int > *)new std::vector< int >(SWIG_STD_MOVE(arg1)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_pop_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_resize__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + (arg1)->resize(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_erase__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< int >::iterator result; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + result = std_vector_Sl_int_Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_erase__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< int >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); + } + } + result = std_vector_Sl_int_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "_intVector_erase", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap__intVector_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap__intVector_erase__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function '_intVector_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::erase(std::vector< int >::iterator)\n" + " std::vector< int >::erase(std::vector< int >::iterator,std::vector< int >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new__intVector__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int >::size_type arg1 ; + std::vector< int >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + std::vector< int > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new__intVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); + } + arg1 = static_cast< std::vector< int >::size_type >(val1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new__intVector" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + result = (std::vector< int > *)new std::vector< int >(SWIG_STD_MOVE(arg1),(std::vector< int >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new__intVector(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new__intVector", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_new__intVector__SWIG_0(self, argc, argv); + case 2: + return _wrap_new__intVector__SWIG_2(self, argc, argv); + case 3: + return _wrap_new__intVector__SWIG_1(self, argc, argv); + case 4: + return _wrap_new__intVector__SWIG_3(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new__intVector'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::vector()\n" + " std::vector< int >::vector(std::vector< int > const &)\n" + " std::vector< int >::vector(std::vector< int >::size_type)\n" + " std::vector< int >::vector(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap__intVector_push_back(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int >::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:_intVector_push_back", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_push_back" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + } + temp2 = static_cast< std::vector< int >::value_type >(val2); + arg2 = &temp2; + (arg1)->push_back((std::vector< int >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_front(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_front" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->front(); + resultobj = SWIG_From_int(static_cast< int >(*result)); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_back" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->back(); + resultobj = SWIG_From_int(static_cast< int >(*result)); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_assign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:_intVector_assign", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_assign" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_intVector_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + (arg1)->assign(SWIG_STD_MOVE(arg2),(std::vector< int >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_resize__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_intVector_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + (arg1)->resize(SWIG_STD_MOVE(arg2),(std::vector< int >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "_intVector_resize", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap__intVector_resize__SWIG_0(self, argc, argv); + case 2: + return _wrap__intVector_resize__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function '_intVector_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::resize(std::vector< int >::size_type)\n" + " std::vector< int >::resize(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap__intVector_insert__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< int >::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + std::vector< int >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_intVector_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + } + temp3 = static_cast< std::vector< int >::value_type >(val3); + arg3 = &temp3; + result = std_vector_Sl_int_Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(int const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_insert__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::size_type arg3 ; + std::vector< int >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector< int >::value_type temp4 ; + int val4 ; + int ecode4 = 0 ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "_intVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_intVector_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'"); + } + arg3 = static_cast< std::vector< int >::size_type >(val3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_intVector_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'"); + } + temp4 = static_cast< std::vector< int >::value_type >(val4); + arg4 = &temp4; + std_vector_Sl_int_Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(int const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "_intVector_insert", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap__intVector_insert__SWIG_0(self, argc, argv); + case 2: + return _wrap__intVector_insert__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function '_intVector_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::value_type const &)\n" + " std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap__intVector_reserve(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:_intVector_reserve", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_reserve" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_intVector_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + } + arg2 = static_cast< std::vector< int >::size_type >(val2); + (arg1)->reserve(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap__intVector_capacity(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< int >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_intVector_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete__intVector(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete__intVector" "', argument " "1"" of type '" "std::vector< int > *""'"); + } + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_intVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_intVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_vector_tree_step_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_iterator" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_step_t_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___nonzero__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___nonzero__" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (bool)std_vector_Sl_step_t_Sg____nonzero__((std::vector< step_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___bool__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___bool__" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (bool)std_vector_Sl_step_t_Sg____bool__((std::vector< step_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___len__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___len__" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = std_vector_Sl_step_t_Sg____len__((std::vector< step_t > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___getslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::difference_type arg2 ; + std::vector< step_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + std::vector< step_t,std::allocator< step_t > > *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_tree_step___getslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___getslice__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step___getslice__" "', argument " "2"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< step_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_step___getslice__" "', argument " "3"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< step_t >::difference_type >(val3); + try { + result = (std::vector< step_t,std::allocator< step_t > > *)std_vector_Sl_step_t_Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_step_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___setslice____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::difference_type arg2 ; + std::vector< step_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___setslice__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step___setslice__" "', argument " "2"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< step_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_step___setslice__" "', argument " "3"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< step_t >::difference_type >(val3); + try { + std_vector_Sl_step_t_Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___setslice____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::difference_type arg2 ; + std::vector< step_t >::difference_type arg3 ; + std::vector< step_t,std::allocator< step_t > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___setslice__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step___setslice__" "', argument " "2"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< step_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_step___setslice__" "', argument " "3"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< step_t >::difference_type >(val3); + { + std::vector< step_t,std::allocator< step_t > > *ptr = (std::vector< step_t,std::allocator< step_t > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_tree_step___setslice__" "', argument " "4"" of type '" "std::vector< step_t,std::allocator< step_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step___setslice__" "', argument " "4"" of type '" "std::vector< step_t,std::allocator< step_t > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_step_t_Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< step_t,std::allocator< step_t > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_step___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[3], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_step___setslice____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_step___setslice____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_step___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< step_t >::__setslice__(std::vector< step_t >::difference_type,std::vector< step_t >::difference_type)\n" + " std::vector< step_t >::__setslice__(std::vector< step_t >::difference_type,std::vector< step_t >::difference_type,std::vector< step_t,std::allocator< step_t > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___delslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::difference_type arg2 ; + std::vector< step_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_tree_step___delslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___delslice__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step___delslice__" "', argument " "2"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< step_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_step___delslice__" "', argument " "3"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< step_t >::difference_type >(val3); + try { + std_vector_Sl_step_t_Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___delitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___delitem__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step___delitem__" "', argument " "2"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< step_t >::difference_type >(val2); + try { + std_vector_Sl_step_t_Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< step_t,std::allocator< step_t > > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___getitem__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + result = (std::vector< step_t,std::allocator< step_t > > *)std_vector_Sl_step_t_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_step_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + std::vector< step_t,std::allocator< step_t > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___setitem__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + { + std::vector< step_t,std::allocator< step_t > > *ptr = (std::vector< step_t,std::allocator< step_t > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_step___setitem__" "', argument " "3"" of type '" "std::vector< step_t,std::allocator< step_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step___setitem__" "', argument " "3"" of type '" "std::vector< step_t,std::allocator< step_t > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_step_t_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< step_t,std::allocator< step_t > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___setitem__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_step_t_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___delitem__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_step_t_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_step___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_step___delitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_tree_step___delitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_step___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< step_t >::__delitem__(std::vector< step_t >::difference_type)\n" + " std::vector< step_t >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___getitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< step_t >::value_type *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___getitem__" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step___getitem__" "', argument " "2"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< step_t >::difference_type >(val2); + try { + result = (std::vector< step_t >::value_type *) &std_vector_Sl_step_t_Sg____getitem____SWIG_1((std::vector< step_t > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_step_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_step___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_step___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_step___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_step___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< step_t >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< step_t >::__getitem__(std::vector< step_t >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___setitem____SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::difference_type arg2 ; + std::vector< step_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step___setitem__" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step___setitem__" "', argument " "2"" of type '" "std::vector< step_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< step_t >::difference_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_step___setitem__" "', argument " "3"" of type '" "std::vector< step_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step___setitem__" "', argument " "3"" of type '" "std::vector< step_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< step_t >::value_type * >(argp3); + try { + std_vector_Sl_step_t_Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(step_t const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_step___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[2], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_step_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_step___setitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_tree_step___setitem____SWIG_0(self, argc, argv); + case 3: + return _wrap_vector_tree_step___setitem____SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_step___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< step_t >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< step_t,std::allocator< step_t > > const &)\n" + " std::vector< step_t >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< step_t >::__setitem__(std::vector< step_t >::difference_type,std::vector< step_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_pop(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::value_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_pop" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + try { + result = std_vector_Sl_step_t_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj((new std::vector< step_t >::value_type(result)), SWIGTYPE_p_step_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_append(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_step_append", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_append" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_tree_step_append" "', argument " "2"" of type '" "std::vector< step_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step_append" "', argument " "2"" of type '" "std::vector< step_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< step_t >::value_type * >(argp2); + std_vector_Sl_step_t_Sg__append(arg1,(step_t const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_step__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< step_t > *result = 0 ; + + (void)self; + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< step_t > *)new std::vector< step_t >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_step_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_step__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< step_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< step_t,std::allocator< step_t > > *ptr = (std::vector< step_t,std::allocator< step_t > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vector_tree_step" "', argument " "1"" of type '" "std::vector< step_t > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_vector_tree_step" "', argument " "1"" of type '" "std::vector< step_t > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< step_t > *)new std::vector< step_t >((std::vector< step_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_step_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_empty(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_empty" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (bool)((std::vector< step_t > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_size(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_size" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = ((std::vector< step_t > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_swap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"v", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_step_swap", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_swap" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_step_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_tree_step_swap" "', argument " "2"" of type '" "std::vector< step_t > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step_swap" "', argument " "2"" of type '" "std::vector< step_t > &""'"); + } + arg2 = reinterpret_cast< std::vector< step_t > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_begin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_begin" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< step_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_end(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_end" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< step_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_rbegin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_rbegin" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< step_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_rend(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_rend" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< step_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_clear(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_clear" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_get_allocator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< step_t > > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_get_allocator" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = ((std::vector< step_t > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< step_t >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_step_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_step__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< step_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_tree_step" "', argument " "1"" of type '" "std::vector< step_t >::size_type""'"); + } + arg1 = static_cast< std::vector< step_t >::size_type >(val1); + result = (std::vector< step_t > *)new std::vector< step_t >(SWIG_STD_MOVE(arg1)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_step_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_pop_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_pop_back" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_resize__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_resize" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step_resize" "', argument " "2"" of type '" "std::vector< step_t >::size_type""'"); + } + arg2 = static_cast< std::vector< step_t >::size_type >(val2); + (arg1)->resize(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_erase__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< step_t >::iterator result; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_erase" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_erase" "', argument " "2"" of type '" "std::vector< step_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_erase" "', argument " "2"" of type '" "std::vector< step_t >::iterator""'"); + } + } + result = std_vector_Sl_step_t_Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< step_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_erase__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::iterator arg2 ; + std::vector< step_t >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< step_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_erase" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_erase" "', argument " "2"" of type '" "std::vector< step_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_erase" "', argument " "2"" of type '" "std::vector< step_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_erase" "', argument " "3"" of type '" "std::vector< step_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_erase" "', argument " "3"" of type '" "std::vector< step_t >::iterator""'"); + } + } + result = std_vector_Sl_step_t_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< step_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_step_erase", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_step_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_step_erase__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_step_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< step_t >::erase(std::vector< step_t >::iterator)\n" + " std::vector< step_t >::erase(std::vector< step_t >::iterator,std::vector< step_t >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_step__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t >::size_type arg1 ; + std::vector< step_t >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::vector< step_t > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_tree_step" "', argument " "1"" of type '" "std::vector< step_t >::size_type""'"); + } + arg1 = static_cast< std::vector< step_t >::size_type >(val1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_vector_tree_step" "', argument " "2"" of type '" "std::vector< step_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_vector_tree_step" "', argument " "2"" of type '" "std::vector< step_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< step_t >::value_type * >(argp2); + result = (std::vector< step_t > *)new std::vector< step_t >(SWIG_STD_MOVE(arg1),(std::vector< step_t >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_step_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_step(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_vector_tree_step", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_step_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_vector_tree_step__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_vector_tree_step__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_vector_tree_step__SWIG_1(self, argc, argv); + case 4: + return _wrap_new_vector_tree_step__SWIG_3(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_vector_tree_step'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< step_t >::vector()\n" + " std::vector< step_t >::vector(std::vector< step_t > const &)\n" + " std::vector< step_t >::vector(std::vector< step_t >::size_type)\n" + " std::vector< step_t >::vector(std::vector< step_t >::size_type,std::vector< step_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_push_back(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_step_push_back", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_push_back" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_tree_step_push_back" "', argument " "2"" of type '" "std::vector< step_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step_push_back" "', argument " "2"" of type '" "std::vector< step_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< step_t >::value_type * >(argp2); + (arg1)->push_back((std::vector< step_t >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_front(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_front" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (std::vector< step_t >::value_type *) &((std::vector< step_t > const *)arg1)->front(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_step_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_back" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = (std::vector< step_t >::value_type *) &((std::vector< step_t > const *)arg1)->back(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_step_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_assign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::size_type arg2 ; + std::vector< step_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_tree_step_assign", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_assign" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step_assign" "', argument " "2"" of type '" "std::vector< step_t >::size_type""'"); + } + arg2 = static_cast< std::vector< step_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_step_assign" "', argument " "3"" of type '" "std::vector< step_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step_assign" "', argument " "3"" of type '" "std::vector< step_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< step_t >::value_type * >(argp3); + (arg1)->assign(SWIG_STD_MOVE(arg2),(std::vector< step_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_resize__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::size_type arg2 ; + std::vector< step_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_resize" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step_resize" "', argument " "2"" of type '" "std::vector< step_t >::size_type""'"); + } + arg2 = static_cast< std::vector< step_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_step_resize" "', argument " "3"" of type '" "std::vector< step_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step_resize" "', argument " "3"" of type '" "std::vector< step_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< step_t >::value_type * >(argp3); + (arg1)->resize(SWIG_STD_MOVE(arg2),(std::vector< step_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_step_resize", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_step_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_step_resize__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_step_resize__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_step_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< step_t >::resize(std::vector< step_t >::size_type)\n" + " std::vector< step_t >::resize(std::vector< step_t >::size_type,std::vector< step_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_insert__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::iterator arg2 ; + std::vector< step_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + std::vector< step_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_insert" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_insert" "', argument " "2"" of type '" "std::vector< step_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_insert" "', argument " "2"" of type '" "std::vector< step_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_step_insert" "', argument " "3"" of type '" "std::vector< step_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step_insert" "', argument " "3"" of type '" "std::vector< step_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< step_t >::value_type * >(argp3); + result = std_vector_Sl_step_t_Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(step_t const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< step_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_insert__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::iterator arg2 ; + std::vector< step_t >::size_type arg3 ; + std::vector< step_t >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_insert" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_insert" "', argument " "2"" of type '" "std::vector< step_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_step_insert" "', argument " "2"" of type '" "std::vector< step_t >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_step_insert" "', argument " "3"" of type '" "std::vector< step_t >::size_type""'"); + } + arg3 = static_cast< std::vector< step_t >::size_type >(val3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_tree_step_insert" "', argument " "4"" of type '" "std::vector< step_t >::value_type const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_step_insert" "', argument " "4"" of type '" "std::vector< step_t >::value_type const &""'"); + } + arg4 = reinterpret_cast< std::vector< step_t >::value_type * >(argp4); + std_vector_Sl_step_t_Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(step_t const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_step_insert", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_step_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< step_t,std::allocator< step_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_step_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_step_insert__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_step_insert__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_step_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< step_t >::insert(std::vector< step_t >::iterator,std::vector< step_t >::value_type const &)\n" + " std::vector< step_t >::insert(std::vector< step_t >::iterator,std::vector< step_t >::size_type,std::vector< step_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_reserve(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + std::vector< step_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_step_reserve", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_reserve" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_step_reserve" "', argument " "2"" of type '" "std::vector< step_t >::size_type""'"); + } + arg2 = static_cast< std::vector< step_t >::size_type >(val2); + (arg1)->reserve(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_step_capacity(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< step_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_step_capacity" "', argument " "1"" of type '" "std::vector< step_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + result = ((std::vector< step_t > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_vector_tree_step(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< step_t > *arg1 = (std::vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_step_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_tree_step" "', argument " "1"" of type '" "std::vector< step_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< step_t > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *vector_tree_step_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_step_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *vector_tree_step_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_vector_tree_key_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_iterator" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_tree_key_t_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___nonzero__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___nonzero__" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (bool)std_vector_Sl_tree_key_t_Sg____nonzero__((std::vector< tree_key_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___bool__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___bool__" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (bool)std_vector_Sl_tree_key_t_Sg____bool__((std::vector< tree_key_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___len__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___len__" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = std_vector_Sl_tree_key_t_Sg____len__((std::vector< tree_key_t > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___getslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::difference_type arg2 ; + std::vector< tree_key_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + std::vector< tree_key_t,std::allocator< tree_key_t > > *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_tree_key___getslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___getslice__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key___getslice__" "', argument " "2"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_key___getslice__" "', argument " "3"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< tree_key_t >::difference_type >(val3); + try { + result = (std::vector< tree_key_t,std::allocator< tree_key_t > > *)std_vector_Sl_tree_key_t_Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_tree_key_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___setslice____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::difference_type arg2 ; + std::vector< tree_key_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___setslice__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key___setslice__" "', argument " "2"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_key___setslice__" "', argument " "3"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< tree_key_t >::difference_type >(val3); + try { + std_vector_Sl_tree_key_t_Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___setslice____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::difference_type arg2 ; + std::vector< tree_key_t >::difference_type arg3 ; + std::vector< tree_key_t,std::allocator< tree_key_t > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___setslice__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key___setslice__" "', argument " "2"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_key___setslice__" "', argument " "3"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< tree_key_t >::difference_type >(val3); + { + std::vector< tree_key_t,std::allocator< tree_key_t > > *ptr = (std::vector< tree_key_t,std::allocator< tree_key_t > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_tree_key___setslice__" "', argument " "4"" of type '" "std::vector< tree_key_t,std::allocator< tree_key_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key___setslice__" "', argument " "4"" of type '" "std::vector< tree_key_t,std::allocator< tree_key_t > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_tree_key_t_Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< tree_key_t,std::allocator< tree_key_t > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_key___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[3], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_key___setslice____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_key___setslice____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_key___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< tree_key_t >::__setslice__(std::vector< tree_key_t >::difference_type,std::vector< tree_key_t >::difference_type)\n" + " std::vector< tree_key_t >::__setslice__(std::vector< tree_key_t >::difference_type,std::vector< tree_key_t >::difference_type,std::vector< tree_key_t,std::allocator< tree_key_t > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___delslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::difference_type arg2 ; + std::vector< tree_key_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_tree_key___delslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___delslice__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key___delslice__" "', argument " "2"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_key___delslice__" "', argument " "3"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< tree_key_t >::difference_type >(val3); + try { + std_vector_Sl_tree_key_t_Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___delitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___delitem__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key___delitem__" "', argument " "2"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::difference_type >(val2); + try { + std_vector_Sl_tree_key_t_Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< tree_key_t,std::allocator< tree_key_t > > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___getitem__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + result = (std::vector< tree_key_t,std::allocator< tree_key_t > > *)std_vector_Sl_tree_key_t_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_tree_key_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + std::vector< tree_key_t,std::allocator< tree_key_t > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___setitem__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + { + std::vector< tree_key_t,std::allocator< tree_key_t > > *ptr = (std::vector< tree_key_t,std::allocator< tree_key_t > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_key___setitem__" "', argument " "3"" of type '" "std::vector< tree_key_t,std::allocator< tree_key_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key___setitem__" "', argument " "3"" of type '" "std::vector< tree_key_t,std::allocator< tree_key_t > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_tree_key_t_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< tree_key_t,std::allocator< tree_key_t > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___setitem__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_tree_key_t_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___delitem__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_tree_key_t_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_key___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_key___delitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_tree_key___delitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_key___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< tree_key_t >::__delitem__(std::vector< tree_key_t >::difference_type)\n" + " std::vector< tree_key_t >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___getitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< tree_key_t >::value_type *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___getitem__" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key___getitem__" "', argument " "2"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::difference_type >(val2); + try { + result = (std::vector< tree_key_t >::value_type *) &std_vector_Sl_tree_key_t_Sg____getitem____SWIG_1((std::vector< tree_key_t > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_key___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_key___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_key___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_key___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< tree_key_t >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< tree_key_t >::__getitem__(std::vector< tree_key_t >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___setitem____SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::difference_type arg2 ; + std::vector< tree_key_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key___setitem__" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key___setitem__" "', argument " "2"" of type '" "std::vector< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::difference_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_key___setitem__" "', argument " "3"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key___setitem__" "', argument " "3"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< tree_key_t >::value_type * >(argp3); + try { + std_vector_Sl_tree_key_t_Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(tree_key_t const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_key___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[2], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_key___setitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_tree_key___setitem____SWIG_0(self, argc, argv); + case 3: + return _wrap_vector_tree_key___setitem____SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_key___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< tree_key_t >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< tree_key_t,std::allocator< tree_key_t > > const &)\n" + " std::vector< tree_key_t >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< tree_key_t >::__setitem__(std::vector< tree_key_t >::difference_type,std::vector< tree_key_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_pop(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::value_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_pop" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + try { + result = std_vector_Sl_tree_key_t_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj((new std::vector< tree_key_t >::value_type(result)), SWIGTYPE_p_tree_key_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_append(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_key_append", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_append" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_tree_key_append" "', argument " "2"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key_append" "', argument " "2"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< tree_key_t >::value_type * >(argp2); + std_vector_Sl_tree_key_t_Sg__append(arg1,(tree_key_t const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_key__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *result = 0 ; + + (void)self; + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< tree_key_t > *)new std::vector< tree_key_t >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_tree_key_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_key__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< tree_key_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< tree_key_t,std::allocator< tree_key_t > > *ptr = (std::vector< tree_key_t,std::allocator< tree_key_t > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vector_tree_key" "', argument " "1"" of type '" "std::vector< tree_key_t > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_vector_tree_key" "', argument " "1"" of type '" "std::vector< tree_key_t > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< tree_key_t > *)new std::vector< tree_key_t >((std::vector< tree_key_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_tree_key_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_empty(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_empty" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (bool)((std::vector< tree_key_t > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_size(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_size" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = ((std::vector< tree_key_t > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_swap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"v", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_key_swap", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_swap" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_tree_key_swap" "', argument " "2"" of type '" "std::vector< tree_key_t > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key_swap" "', argument " "2"" of type '" "std::vector< tree_key_t > &""'"); + } + arg2 = reinterpret_cast< std::vector< tree_key_t > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_begin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_begin" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_end(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_end" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_rbegin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_rbegin" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< tree_key_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_rend(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_rend" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< tree_key_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_clear(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_clear" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_get_allocator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< tree_key_t > > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_get_allocator" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = ((std::vector< tree_key_t > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< tree_key_t >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_tree_key_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_key__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< tree_key_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_tree_key" "', argument " "1"" of type '" "std::vector< tree_key_t >::size_type""'"); + } + arg1 = static_cast< std::vector< tree_key_t >::size_type >(val1); + result = (std::vector< tree_key_t > *)new std::vector< tree_key_t >(SWIG_STD_MOVE(arg1)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_tree_key_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_pop_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_pop_back" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_resize__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_resize" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key_resize" "', argument " "2"" of type '" "std::vector< tree_key_t >::size_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::size_type >(val2); + (arg1)->resize(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_erase__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< tree_key_t >::iterator result; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_erase" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_erase" "', argument " "2"" of type '" "std::vector< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_erase" "', argument " "2"" of type '" "std::vector< tree_key_t >::iterator""'"); + } + } + result = std_vector_Sl_tree_key_t_Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_erase__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::iterator arg2 ; + std::vector< tree_key_t >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< tree_key_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_erase" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_erase" "', argument " "2"" of type '" "std::vector< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_erase" "', argument " "2"" of type '" "std::vector< tree_key_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_erase" "', argument " "3"" of type '" "std::vector< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_erase" "', argument " "3"" of type '" "std::vector< tree_key_t >::iterator""'"); + } + } + result = std_vector_Sl_tree_key_t_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_key_erase", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_key_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_key_erase__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_key_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< tree_key_t >::erase(std::vector< tree_key_t >::iterator)\n" + " std::vector< tree_key_t >::erase(std::vector< tree_key_t >::iterator,std::vector< tree_key_t >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_key__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t >::size_type arg1 ; + std::vector< tree_key_t >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::vector< tree_key_t > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_tree_key" "', argument " "1"" of type '" "std::vector< tree_key_t >::size_type""'"); + } + arg1 = static_cast< std::vector< tree_key_t >::size_type >(val1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_vector_tree_key" "', argument " "2"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_vector_tree_key" "', argument " "2"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< tree_key_t >::value_type * >(argp2); + result = (std::vector< tree_key_t > *)new std::vector< tree_key_t >(SWIG_STD_MOVE(arg1),(std::vector< tree_key_t >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_tree_key_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_key(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_vector_tree_key", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_vector_tree_key__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_vector_tree_key__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_vector_tree_key__SWIG_1(self, argc, argv); + case 4: + return _wrap_new_vector_tree_key__SWIG_3(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_vector_tree_key'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< tree_key_t >::vector()\n" + " std::vector< tree_key_t >::vector(std::vector< tree_key_t > const &)\n" + " std::vector< tree_key_t >::vector(std::vector< tree_key_t >::size_type)\n" + " std::vector< tree_key_t >::vector(std::vector< tree_key_t >::size_type,std::vector< tree_key_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_push_back(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_key_push_back", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_push_back" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_tree_key_push_back" "', argument " "2"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key_push_back" "', argument " "2"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< tree_key_t >::value_type * >(argp2); + (arg1)->push_back((std::vector< tree_key_t >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_front(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_front" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (std::vector< tree_key_t >::value_type *) &((std::vector< tree_key_t > const *)arg1)->front(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_back" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = (std::vector< tree_key_t >::value_type *) &((std::vector< tree_key_t > const *)arg1)->back(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_assign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::size_type arg2 ; + std::vector< tree_key_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_tree_key_assign", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_assign" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key_assign" "', argument " "2"" of type '" "std::vector< tree_key_t >::size_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_key_assign" "', argument " "3"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key_assign" "', argument " "3"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< tree_key_t >::value_type * >(argp3); + (arg1)->assign(SWIG_STD_MOVE(arg2),(std::vector< tree_key_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_resize__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::size_type arg2 ; + std::vector< tree_key_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_resize" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key_resize" "', argument " "2"" of type '" "std::vector< tree_key_t >::size_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_key_resize" "', argument " "3"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key_resize" "', argument " "3"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< tree_key_t >::value_type * >(argp3); + (arg1)->resize(SWIG_STD_MOVE(arg2),(std::vector< tree_key_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_key_resize", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_key_resize__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_key_resize__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_key_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< tree_key_t >::resize(std::vector< tree_key_t >::size_type)\n" + " std::vector< tree_key_t >::resize(std::vector< tree_key_t >::size_type,std::vector< tree_key_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_insert__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::iterator arg2 ; + std::vector< tree_key_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + std::vector< tree_key_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_insert" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_insert" "', argument " "2"" of type '" "std::vector< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_insert" "', argument " "2"" of type '" "std::vector< tree_key_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_key_insert" "', argument " "3"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key_insert" "', argument " "3"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< tree_key_t >::value_type * >(argp3); + result = std_vector_Sl_tree_key_t_Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(tree_key_t const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_insert__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::iterator arg2 ; + std::vector< tree_key_t >::size_type arg3 ; + std::vector< tree_key_t >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_insert" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_insert" "', argument " "2"" of type '" "std::vector< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_key_insert" "', argument " "2"" of type '" "std::vector< tree_key_t >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_key_insert" "', argument " "3"" of type '" "std::vector< tree_key_t >::size_type""'"); + } + arg3 = static_cast< std::vector< tree_key_t >::size_type >(val3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_tree_key_insert" "', argument " "4"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_key_insert" "', argument " "4"" of type '" "std::vector< tree_key_t >::value_type const &""'"); + } + arg4 = reinterpret_cast< std::vector< tree_key_t >::value_type * >(argp4); + std_vector_Sl_tree_key_t_Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(tree_key_t const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_key_insert", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_key_insert__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_key_insert__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_key_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< tree_key_t >::insert(std::vector< tree_key_t >::iterator,std::vector< tree_key_t >::value_type const &)\n" + " std::vector< tree_key_t >::insert(std::vector< tree_key_t >::iterator,std::vector< tree_key_t >::size_type,std::vector< tree_key_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_reserve(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + std::vector< tree_key_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_key_reserve", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_reserve" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_key_reserve" "', argument " "2"" of type '" "std::vector< tree_key_t >::size_type""'"); + } + arg2 = static_cast< std::vector< tree_key_t >::size_type >(val2); + (arg1)->reserve(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_key_capacity(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< tree_key_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_key_capacity" "', argument " "1"" of type '" "std::vector< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + result = ((std::vector< tree_key_t > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_vector_tree_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< tree_key_t > *arg1 = (std::vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_tree_key_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_tree_key" "', argument " "1"" of type '" "std::vector< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< tree_key_t > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *vector_tree_key_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_tree_key_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *vector_tree_key_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_list_tree_key_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_iterator" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (swig::SwigPyIterator *)std_list_Sl_tree_key_t_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___nonzero__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___nonzero__" "', argument " "1"" of type '" "std::list< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (bool)std_list_Sl_tree_key_t_Sg____nonzero__((std::list< tree_key_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___bool__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___bool__" "', argument " "1"" of type '" "std::list< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (bool)std_list_Sl_tree_key_t_Sg____bool__((std::list< tree_key_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___len__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::list< tree_key_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___len__" "', argument " "1"" of type '" "std::list< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = std_list_Sl_tree_key_t_Sg____len__((std::list< tree_key_t > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___getslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::difference_type arg2 ; + std::list< tree_key_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + std::list< tree_key_t,std::allocator< tree_key_t > > *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:list_tree_key___getslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___getslice__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key___getslice__" "', argument " "2"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "list_tree_key___getslice__" "', argument " "3"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg3 = static_cast< std::list< tree_key_t >::difference_type >(val3); + try { + result = (std::list< tree_key_t,std::allocator< tree_key_t > > *)std_list_Sl_tree_key_t_Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_tree_key_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___setslice____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::difference_type arg2 ; + std::list< tree_key_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___setslice__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key___setslice__" "', argument " "2"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "list_tree_key___setslice__" "', argument " "3"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg3 = static_cast< std::list< tree_key_t >::difference_type >(val3); + try { + std_list_Sl_tree_key_t_Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___setslice____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::difference_type arg2 ; + std::list< tree_key_t >::difference_type arg3 ; + std::list< tree_key_t,std::allocator< tree_key_t > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___setslice__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key___setslice__" "', argument " "2"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "list_tree_key___setslice__" "', argument " "3"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg3 = static_cast< std::list< tree_key_t >::difference_type >(val3); + { + std::list< tree_key_t,std::allocator< tree_key_t > > *ptr = (std::list< tree_key_t,std::allocator< tree_key_t > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "list_tree_key___setslice__" "', argument " "4"" of type '" "std::list< tree_key_t,std::allocator< tree_key_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key___setslice__" "', argument " "4"" of type '" "std::list< tree_key_t,std::allocator< tree_key_t > > const &""'"); + } + arg4 = ptr; + } + try { + std_list_Sl_tree_key_t_Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::list< tree_key_t,std::allocator< tree_key_t > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "list_tree_key___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[3], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_list_tree_key___setslice____SWIG_0(self, argc, argv); + case 2: + return _wrap_list_tree_key___setslice____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'list_tree_key___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::list< tree_key_t >::__setslice__(std::list< tree_key_t >::difference_type,std::list< tree_key_t >::difference_type)\n" + " std::list< tree_key_t >::__setslice__(std::list< tree_key_t >::difference_type,std::list< tree_key_t >::difference_type,std::list< tree_key_t,std::allocator< tree_key_t > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___delslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::difference_type arg2 ; + std::list< tree_key_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:list_tree_key___delslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___delslice__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key___delslice__" "', argument " "2"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "list_tree_key___delslice__" "', argument " "3"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg3 = static_cast< std::list< tree_key_t >::difference_type >(val3); + try { + std_list_Sl_tree_key_t_Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___delitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___delitem__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key___delitem__" "', argument " "2"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::difference_type >(val2); + try { + std_list_Sl_tree_key_t_Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::list< tree_key_t,std::allocator< tree_key_t > > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___getitem__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + result = (std::list< tree_key_t,std::allocator< tree_key_t > > *)std_list_Sl_tree_key_t_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_tree_key_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + std::list< tree_key_t,std::allocator< tree_key_t > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___setitem__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + { + std::list< tree_key_t,std::allocator< tree_key_t > > *ptr = (std::list< tree_key_t,std::allocator< tree_key_t > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "list_tree_key___setitem__" "', argument " "3"" of type '" "std::list< tree_key_t,std::allocator< tree_key_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key___setitem__" "', argument " "3"" of type '" "std::list< tree_key_t,std::allocator< tree_key_t > > const &""'"); + } + arg3 = ptr; + } + try { + std_list_Sl_tree_key_t_Sg____setitem____SWIG_0(arg1,arg2,(std::list< tree_key_t,std::allocator< tree_key_t > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___setitem__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_list_Sl_tree_key_t_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___delitem__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_list_Sl_tree_key_t_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "list_tree_key___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_list_tree_key___delitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_list_tree_key___delitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'list_tree_key___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::list< tree_key_t >::__delitem__(std::list< tree_key_t >::difference_type)\n" + " std::list< tree_key_t >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___getitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::list< tree_key_t >::value_type *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___getitem__" "', argument " "1"" of type '" "std::list< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key___getitem__" "', argument " "2"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::difference_type >(val2); + try { + result = (std::list< tree_key_t >::value_type *) &std_list_Sl_tree_key_t_Sg____getitem____SWIG_1((std::list< tree_key_t > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "list_tree_key___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_list_tree_key___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_list_tree_key___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'list_tree_key___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::list< tree_key_t >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::list< tree_key_t >::__getitem__(std::list< tree_key_t >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___setitem____SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::difference_type arg2 ; + std::list< tree_key_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key___setitem__" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key___setitem__" "', argument " "2"" of type '" "std::list< tree_key_t >::difference_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::difference_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "list_tree_key___setitem__" "', argument " "3"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key___setitem__" "', argument " "3"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::list< tree_key_t >::value_type * >(argp3); + try { + std_list_Sl_tree_key_t_Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(tree_key_t const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "list_tree_key___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[2], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_list_tree_key___setitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_list_tree_key___setitem____SWIG_0(self, argc, argv); + case 3: + return _wrap_list_tree_key___setitem____SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'list_tree_key___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::list< tree_key_t >::__setitem__(SWIGPY_SLICEOBJECT *,std::list< tree_key_t,std::allocator< tree_key_t > > const &)\n" + " std::list< tree_key_t >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::list< tree_key_t >::__setitem__(std::list< tree_key_t >::difference_type,std::list< tree_key_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_pop(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::list< tree_key_t >::value_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_pop" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + try { + result = std_list_Sl_tree_key_t_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj((new std::list< tree_key_t >::value_type(result)), SWIGTYPE_p_tree_key_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_append(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:list_tree_key_append", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_append" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "list_tree_key_append" "', argument " "2"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key_append" "', argument " "2"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::list< tree_key_t >::value_type * >(argp2); + std_list_Sl_tree_key_t_Sg__append(arg1,(tree_key_t const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_list_tree_key__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::list< tree_key_t > *result = 0 ; + + (void)self; + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::list< tree_key_t > *)new std::list< tree_key_t >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_tree_key_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_list_tree_key__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::list< tree_key_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::list< tree_key_t,std::allocator< tree_key_t > > *ptr = (std::list< tree_key_t,std::allocator< tree_key_t > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_list_tree_key" "', argument " "1"" of type '" "std::list< tree_key_t > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_list_tree_key" "', argument " "1"" of type '" "std::list< tree_key_t > const &""'"); + } + arg1 = ptr; + } + result = (std::list< tree_key_t > *)new std::list< tree_key_t >((std::list< tree_key_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_tree_key_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_empty(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_empty" "', argument " "1"" of type '" "std::list< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (bool)((std::list< tree_key_t > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_size(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::list< tree_key_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_size" "', argument " "1"" of type '" "std::list< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = ((std::list< tree_key_t > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_swap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"v", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:list_tree_key_swap", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_swap" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__listT_tree_key_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "list_tree_key_swap" "', argument " "2"" of type '" "std::list< tree_key_t > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key_swap" "', argument " "2"" of type '" "std::list< tree_key_t > &""'"); + } + arg2 = reinterpret_cast< std::list< tree_key_t > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_begin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::list< tree_key_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_begin" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::list< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_end(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::list< tree_key_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_end" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::list< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_rbegin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::list< tree_key_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_rbegin" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::list< tree_key_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_rend(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::list< tree_key_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_rend" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::list< tree_key_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_clear(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_clear" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_get_allocator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< tree_key_t > > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_get_allocator" "', argument " "1"" of type '" "std::list< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = ((std::list< tree_key_t > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::list< tree_key_t >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_tree_key_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_list_tree_key__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::list< tree_key_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_list_tree_key" "', argument " "1"" of type '" "std::list< tree_key_t >::size_type""'"); + } + arg1 = static_cast< std::list< tree_key_t >::size_type >(val1); + result = (std::list< tree_key_t > *)new std::list< tree_key_t >(SWIG_STD_MOVE(arg1)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_tree_key_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_pop_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_pop_back" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_resize__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_resize" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key_resize" "', argument " "2"" of type '" "std::list< tree_key_t >::size_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::size_type >(val2); + (arg1)->resize(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_erase__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::list< tree_key_t >::iterator result; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_erase" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_erase" "', argument " "2"" of type '" "std::list< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_erase" "', argument " "2"" of type '" "std::list< tree_key_t >::iterator""'"); + } + } + result = std_list_Sl_tree_key_t_Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::list< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_erase__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::iterator arg2 ; + std::list< tree_key_t >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::list< tree_key_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_erase" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_erase" "', argument " "2"" of type '" "std::list< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_erase" "', argument " "2"" of type '" "std::list< tree_key_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_erase" "', argument " "3"" of type '" "std::list< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_erase" "', argument " "3"" of type '" "std::list< tree_key_t >::iterator""'"); + } + } + result = std_list_Sl_tree_key_t_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::list< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "list_tree_key_erase", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_list_tree_key_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_list_tree_key_erase__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'list_tree_key_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::list< tree_key_t >::erase(std::list< tree_key_t >::iterator)\n" + " std::list< tree_key_t >::erase(std::list< tree_key_t >::iterator,std::list< tree_key_t >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_list_tree_key__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t >::size_type arg1 ; + std::list< tree_key_t >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::list< tree_key_t > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_list_tree_key" "', argument " "1"" of type '" "std::list< tree_key_t >::size_type""'"); + } + arg1 = static_cast< std::list< tree_key_t >::size_type >(val1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_list_tree_key" "', argument " "2"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_list_tree_key" "', argument " "2"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::list< tree_key_t >::value_type * >(argp2); + result = (std::list< tree_key_t > *)new std::list< tree_key_t >(SWIG_STD_MOVE(arg1),(std::list< tree_key_t >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_tree_key_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_list_tree_key(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_list_tree_key", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_list_tree_key__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_list_tree_key__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_list_tree_key__SWIG_1(self, argc, argv); + case 4: + return _wrap_new_list_tree_key__SWIG_3(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_list_tree_key'.\n" + " Possible C/C++ prototypes are:\n" + " std::list< tree_key_t >::list()\n" + " std::list< tree_key_t >::list(std::list< tree_key_t > const &)\n" + " std::list< tree_key_t >::list(std::list< tree_key_t >::size_type)\n" + " std::list< tree_key_t >::list(std::list< tree_key_t >::size_type,std::list< tree_key_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_push_back(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:list_tree_key_push_back", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_push_back" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "list_tree_key_push_back" "', argument " "2"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key_push_back" "', argument " "2"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::list< tree_key_t >::value_type * >(argp2); + (arg1)->push_back((std::list< tree_key_t >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_front(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::list< tree_key_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_front" "', argument " "1"" of type '" "std::list< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (std::list< tree_key_t >::value_type *) &((std::list< tree_key_t > const *)arg1)->front(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::list< tree_key_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_back" "', argument " "1"" of type '" "std::list< tree_key_t > const *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + result = (std::list< tree_key_t >::value_type *) &((std::list< tree_key_t > const *)arg1)->back(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_assign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::size_type arg2 ; + std::list< tree_key_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:list_tree_key_assign", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_assign" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key_assign" "', argument " "2"" of type '" "std::list< tree_key_t >::size_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "list_tree_key_assign" "', argument " "3"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key_assign" "', argument " "3"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::list< tree_key_t >::value_type * >(argp3); + (arg1)->assign(SWIG_STD_MOVE(arg2),(std::list< tree_key_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_resize__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::size_type arg2 ; + std::list< tree_key_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_resize" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "list_tree_key_resize" "', argument " "2"" of type '" "std::list< tree_key_t >::size_type""'"); + } + arg2 = static_cast< std::list< tree_key_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "list_tree_key_resize" "', argument " "3"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key_resize" "', argument " "3"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::list< tree_key_t >::value_type * >(argp3); + (arg1)->resize(SWIG_STD_MOVE(arg2),(std::list< tree_key_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "list_tree_key_resize", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_list_tree_key_resize__SWIG_0(self, argc, argv); + case 2: + return _wrap_list_tree_key_resize__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'list_tree_key_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::list< tree_key_t >::resize(std::list< tree_key_t >::size_type)\n" + " std::list< tree_key_t >::resize(std::list< tree_key_t >::size_type,std::list< tree_key_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_insert__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::iterator arg2 ; + std::list< tree_key_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + std::list< tree_key_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_insert" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_insert" "', argument " "2"" of type '" "std::list< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_insert" "', argument " "2"" of type '" "std::list< tree_key_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "list_tree_key_insert" "', argument " "3"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key_insert" "', argument " "3"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::list< tree_key_t >::value_type * >(argp3); + result = std_list_Sl_tree_key_t_Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(tree_key_t const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::list< tree_key_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_insert__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::iterator arg2 ; + std::list< tree_key_t >::size_type arg3 ; + std::list< tree_key_t >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_insert" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_insert" "', argument " "2"" of type '" "std::list< tree_key_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "list_tree_key_insert" "', argument " "2"" of type '" "std::list< tree_key_t >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "list_tree_key_insert" "', argument " "3"" of type '" "std::list< tree_key_t >::size_type""'"); + } + arg3 = static_cast< std::list< tree_key_t >::size_type >(val3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "list_tree_key_insert" "', argument " "4"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key_insert" "', argument " "4"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + arg4 = reinterpret_cast< std::list< tree_key_t >::value_type * >(argp4); + std_list_Sl_tree_key_t_Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(tree_key_t const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "list_tree_key_insert", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::list< tree_key_t,std::allocator< tree_key_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_list_tree_key_insert__SWIG_0(self, argc, argv); + case 2: + return _wrap_list_tree_key_insert__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'list_tree_key_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::list< tree_key_t >::insert(std::list< tree_key_t >::iterator,std::list< tree_key_t >::value_type const &)\n" + " std::list< tree_key_t >::insert(std::list< tree_key_t >::iterator,std::list< tree_key_t >::size_type,std::list< tree_key_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_pop_front(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_pop_front" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + (arg1)->pop_front(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_push_front(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + std::list< tree_key_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:list_tree_key_push_front", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_push_front" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "list_tree_key_push_front" "', argument " "2"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "list_tree_key_push_front" "', argument " "2"" of type '" "std::list< tree_key_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::list< tree_key_t >::value_type * >(argp2); + (arg1)->push_front((std::list< tree_key_t >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_list_tree_key_reverse(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "list_tree_key_reverse" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + (arg1)->reverse(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_list_tree_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::list< tree_key_t > *arg1 = (std::list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__listT_tree_key_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_list_tree_key" "', argument " "1"" of type '" "std::list< tree_key_t > *""'"); + } + arg1 = reinterpret_cast< std::list< tree_key_t > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *list_tree_key_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__listT_tree_key_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *list_tree_key_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_map_key_edge__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::less< tree_key_t > *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< tree_key_t,edge_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_tree_key_t_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_map_key_edge" "', argument " "1"" of type '" "std::less< tree_key_t > const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_map_key_edge" "', argument " "1"" of type '" "std::less< tree_key_t > const &""'"); + } + arg1 = reinterpret_cast< std::less< tree_key_t > * >(argp1); + result = (std::map< tree_key_t,edge_t > *)new std::map< tree_key_t,edge_t >((std::less< tree_key_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_iterator" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_tree_key_t_Sc_edge_t_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge___nonzero__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge___nonzero__" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (bool)std_map_Sl_tree_key_t_Sc_edge_t_Sg____nonzero__((std::map< tree_key_t,edge_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge___bool__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge___bool__" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (bool)std_map_Sl_tree_key_t_Sc_edge_t_Sg____bool__((std::map< tree_key_t,edge_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge___len__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,edge_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge___len__" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = std_map_Sl_tree_key_t_Sc_edge_t_Sg____len__((std::map< tree_key_t,edge_t > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge___getitem__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"key", NULL + }; + std::map< tree_key_t,edge_t >::mapped_type *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_edge___getitem__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge___getitem__" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge___getitem__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge___getitem__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + try { + result = (std::map< tree_key_t,edge_t >::mapped_type *) &std_map_Sl_tree_key_t_Sc_edge_t_Sg____getitem__(arg1,(tree_key_t const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_edge_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge___delitem__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"key", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_edge___delitem__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge___delitem__" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge___delitem__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge___delitem__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + try { + std_map_Sl_tree_key_t_Sc_edge_t_Sg____delitem__(arg1,(tree_key_t const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_has_key(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"key", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_edge_has_key", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_has_key" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge_has_key" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge_has_key" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + result = (bool)std_map_Sl_tree_key_t_Sc_edge_t_Sg__has_key((std::map< tree_key_t,edge_t > const *)arg1,(tree_key_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_keys(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_keys" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (PyObject *)std_map_Sl_tree_key_t_Sc_edge_t_Sg__keys(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_values(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_values" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (PyObject *)std_map_Sl_tree_key_t_Sc_edge_t_Sg__values(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_items(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_items" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (PyObject *)std_map_Sl_tree_key_t_Sc_edge_t_Sg__items(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge___contains__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"key", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_edge___contains__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge___contains__" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge___contains__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge___contains__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + result = (bool)std_map_Sl_tree_key_t_Sc_edge_t_Sg____contains__(arg1,(tree_key_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_key_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_key_iterator" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_tree_key_t_Sc_edge_t_Sg__key_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_value_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_value_iterator" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_tree_key_t_Sc_edge_t_Sg__value_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge___setitem__" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge___setitem__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge___setitem__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + std_map_Sl_tree_key_t_Sc_edge_t_Sg____setitem____SWIG_0(arg1,(tree_key_t const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + std::map< tree_key_t,edge_t >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge___setitem__" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge___setitem__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge___setitem__" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_edge_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "map_key_edge___setitem__" "', argument " "3"" of type '" "std::map< tree_key_t,edge_t >::mapped_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge___setitem__" "', argument " "3"" of type '" "std::map< tree_key_t,edge_t >::mapped_type const &""'"); + } + arg3 = reinterpret_cast< std::map< tree_key_t,edge_t >::mapped_type * >(argp3); + try { + std_map_Sl_tree_key_t_Sc_edge_t_Sg____setitem____SWIG_1(arg1,(tree_key_t const &)*arg2,(edge_t const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "map_key_edge___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_edge_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_map_key_edge___setitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_map_key_edge___setitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'map_key_edge___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< tree_key_t,edge_t >::__setitem__(std::map< tree_key_t,edge_t >::key_type const &)\n" + " std::map< tree_key_t,edge_t >::__setitem__(std::map< tree_key_t,edge_t >::key_type const &,std::map< tree_key_t,edge_t >::mapped_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_asdict(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_asdict" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (PyObject *)std_map_Sl_tree_key_t_Sc_edge_t_Sg__asdict(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_map_key_edge__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *result = 0 ; + + (void)self; + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::map< tree_key_t,edge_t > *)new std::map< tree_key_t,edge_t >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_map_key_edge__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< tree_key_t,edge_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > > *ptr = (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_map_key_edge" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_map_key_edge" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const &""'"); + } + arg1 = ptr; + } + result = (std::map< tree_key_t,edge_t > *)new std::map< tree_key_t,edge_t >((std::map< tree_key_t,edge_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_map_key_edge(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_map_key_edge", 0, 1, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_tree_key_t_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_map_key_edge__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_map_key_edge__SWIG_0(self, argc, argv); + case 3: + return _wrap_new_map_key_edge__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_map_key_edge'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< tree_key_t,edge_t >::map(std::less< tree_key_t > const &)\n" + " std::map< tree_key_t,edge_t >::map()\n" + " std::map< tree_key_t,edge_t >::map(std::map< tree_key_t,edge_t > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_empty(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_empty" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (bool)((std::map< tree_key_t,edge_t > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_size(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,edge_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_size" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = ((std::map< tree_key_t,edge_t > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_swap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"v", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_edge_swap", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_swap" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge_swap" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge_swap" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t > &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_begin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,edge_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_begin" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,edge_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_end(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,edge_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_end" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,edge_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_rbegin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,edge_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_rbegin" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,edge_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_rend(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,edge_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_rend" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,edge_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_clear(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_clear" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_get_allocator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< std::pair< tree_key_t const,edge_t > > > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_get_allocator" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + result = ((std::map< tree_key_t,edge_t > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::map< tree_key_t,edge_t >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_std__pairT_tree_key_t_const_edge_t_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_erase__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::map< tree_key_t,edge_t >::size_type result; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_erase" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge_erase" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge_erase" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + result = (arg1)->erase((std::map< tree_key_t,edge_t >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_count(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + std::map< tree_key_t,edge_t >::size_type result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_edge_count", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_count" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge_count" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge_count" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + result = ((std::map< tree_key_t,edge_t > const *)arg1)->count((std::map< tree_key_t,edge_t >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_erase__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_erase" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_edge_erase" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_edge_erase" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::iterator""'"); + } + } + std_map_Sl_tree_key_t_Sc_edge_t_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_erase__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::iterator arg2 ; + std::map< tree_key_t,edge_t >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_erase" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_edge_erase" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_edge_erase" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_edge_erase" "', argument " "3"" of type '" "std::map< tree_key_t,edge_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_edge_erase" "', argument " "3"" of type '" "std::map< tree_key_t,edge_t >::iterator""'"); + } + } + std_map_Sl_tree_key_t_Sc_edge_t_Sg__erase__SWIG_2(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "map_key_edge_erase", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_map_key_edge_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_map_key_edge_erase__SWIG_1(self, argc, argv); + case 3: + return _wrap_map_key_edge_erase__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'map_key_edge_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< tree_key_t,edge_t >::erase(std::map< tree_key_t,edge_t >::key_type const &)\n" + " std::map< tree_key_t,edge_t >::erase(std::map< tree_key_t,edge_t >::iterator)\n" + " std::map< tree_key_t,edge_t >::erase(std::map< tree_key_t,edge_t >::iterator,std::map< tree_key_t,edge_t >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_find(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + std::map< tree_key_t,edge_t >::iterator result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_edge_find", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_find" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge_find" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge_find" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + result = (arg1)->find((std::map< tree_key_t,edge_t >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,edge_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_lower_bound(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + std::map< tree_key_t,edge_t >::iterator result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_edge_lower_bound", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_lower_bound" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge_lower_bound" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge_lower_bound" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + result = (arg1)->lower_bound((std::map< tree_key_t,edge_t >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,edge_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_edge_upper_bound(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + std::map< tree_key_t,edge_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + std::map< tree_key_t,edge_t >::iterator result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_edge_upper_bound", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_edge_upper_bound" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_edge_upper_bound" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_edge_upper_bound" "', argument " "2"" of type '" "std::map< tree_key_t,edge_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,edge_t >::key_type * >(argp2); + result = (arg1)->upper_bound((std::map< tree_key_t,edge_t >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,edge_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_map_key_edge(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,edge_t > *arg1 = (std::map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_key_edge" "', argument " "1"" of type '" "std::map< tree_key_t,edge_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,edge_t > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *map_key_edge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *map_key_edge_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_map_key_node__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::less< tree_key_t > *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::map< tree_key_t,node_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_std__lessT_tree_key_t_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_map_key_node" "', argument " "1"" of type '" "std::less< tree_key_t > const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_map_key_node" "', argument " "1"" of type '" "std::less< tree_key_t > const &""'"); + } + arg1 = reinterpret_cast< std::less< tree_key_t > * >(argp1); + result = (std::map< tree_key_t,node_t > *)new std::map< tree_key_t,node_t >((std::less< tree_key_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_iterator" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_tree_key_t_Sc_node_t_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node___nonzero__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node___nonzero__" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (bool)std_map_Sl_tree_key_t_Sc_node_t_Sg____nonzero__((std::map< tree_key_t,node_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node___bool__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node___bool__" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (bool)std_map_Sl_tree_key_t_Sc_node_t_Sg____bool__((std::map< tree_key_t,node_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node___len__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,node_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node___len__" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = std_map_Sl_tree_key_t_Sc_node_t_Sg____len__((std::map< tree_key_t,node_t > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node___getitem__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"key", NULL + }; + std::map< tree_key_t,node_t >::mapped_type *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_node___getitem__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node___getitem__" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node___getitem__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node___getitem__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + try { + result = (std::map< tree_key_t,node_t >::mapped_type *) &std_map_Sl_tree_key_t_Sc_node_t_Sg____getitem__(arg1,(tree_key_t const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_node_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node___delitem__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"key", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_node___delitem__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node___delitem__" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node___delitem__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node___delitem__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + try { + std_map_Sl_tree_key_t_Sc_node_t_Sg____delitem__(arg1,(tree_key_t const &)*arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_has_key(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"key", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_node_has_key", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_has_key" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node_has_key" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node_has_key" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + result = (bool)std_map_Sl_tree_key_t_Sc_node_t_Sg__has_key((std::map< tree_key_t,node_t > const *)arg1,(tree_key_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_keys(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_keys" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (PyObject *)std_map_Sl_tree_key_t_Sc_node_t_Sg__keys(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_values(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_values" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (PyObject *)std_map_Sl_tree_key_t_Sc_node_t_Sg__values(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_items(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_items" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (PyObject *)std_map_Sl_tree_key_t_Sc_node_t_Sg__items(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node___contains__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"key", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_node___contains__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node___contains__" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node___contains__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node___contains__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + result = (bool)std_map_Sl_tree_key_t_Sc_node_t_Sg____contains__(arg1,(tree_key_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_key_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_key_iterator" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_tree_key_t_Sc_node_t_Sg__key_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_value_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_value_iterator" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (swig::SwigPyIterator *)std_map_Sl_tree_key_t_Sc_node_t_Sg__value_iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node___setitem__" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node___setitem__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node___setitem__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + std_map_Sl_tree_key_t_Sc_node_t_Sg____setitem____SWIG_0(arg1,(tree_key_t const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + std::map< tree_key_t,node_t >::mapped_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node___setitem__" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node___setitem__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node___setitem__" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_node_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "map_key_node___setitem__" "', argument " "3"" of type '" "std::map< tree_key_t,node_t >::mapped_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node___setitem__" "', argument " "3"" of type '" "std::map< tree_key_t,node_t >::mapped_type const &""'"); + } + arg3 = reinterpret_cast< std::map< tree_key_t,node_t >::mapped_type * >(argp3); + try { + std_map_Sl_tree_key_t_Sc_node_t_Sg____setitem____SWIG_1(arg1,(tree_key_t const &)*arg2,(node_t const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "map_key_node___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_node_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_map_key_node___setitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_map_key_node___setitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'map_key_node___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< tree_key_t,node_t >::__setitem__(std::map< tree_key_t,node_t >::key_type const &)\n" + " std::map< tree_key_t,node_t >::__setitem__(std::map< tree_key_t,node_t >::key_type const &,std::map< tree_key_t,node_t >::mapped_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_asdict(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_asdict" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (PyObject *)std_map_Sl_tree_key_t_Sc_node_t_Sg__asdict(arg1); + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_map_key_node__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *result = 0 ; + + (void)self; + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::map< tree_key_t,node_t > *)new std::map< tree_key_t,node_t >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_map_key_node__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::map< tree_key_t,node_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > > *ptr = (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_map_key_node" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_map_key_node" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const &""'"); + } + arg1 = ptr; + } + result = (std::map< tree_key_t,node_t > *)new std::map< tree_key_t,node_t >((std::map< tree_key_t,node_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_map_key_node(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[2] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_map_key_node", 0, 1, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__lessT_tree_key_t_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_map_key_node__SWIG_1(self, argc, argv); + case 2: + return _wrap_new_map_key_node__SWIG_0(self, argc, argv); + case 3: + return _wrap_new_map_key_node__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_map_key_node'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< tree_key_t,node_t >::map(std::less< tree_key_t > const &)\n" + " std::map< tree_key_t,node_t >::map()\n" + " std::map< tree_key_t,node_t >::map(std::map< tree_key_t,node_t > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_empty(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_empty" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (bool)((std::map< tree_key_t,node_t > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_size(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,node_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_size" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = ((std::map< tree_key_t,node_t > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_swap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"v", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_node_swap", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_swap" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node_swap" "', argument " "2"" of type '" "std::map< tree_key_t,node_t > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node_swap" "', argument " "2"" of type '" "std::map< tree_key_t,node_t > &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_begin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,node_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_begin" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_end(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,node_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_end" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_rbegin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,node_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_rbegin" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,node_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_rend(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::map< tree_key_t,node_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_rend" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,node_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_clear(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_clear" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_get_allocator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< std::pair< tree_key_t const,node_t > > > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_get_allocator" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + result = ((std::map< tree_key_t,node_t > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::map< tree_key_t,node_t >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_std__pairT_tree_key_t_const_node_t_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_erase__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::map< tree_key_t,node_t >::size_type result; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_erase" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node_erase" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node_erase" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + result = (arg1)->erase((std::map< tree_key_t,node_t >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_count(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + std::map< tree_key_t,node_t >::size_type result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_node_count", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_count" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > const *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node_count" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node_count" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + result = ((std::map< tree_key_t,node_t > const *)arg1)->count((std::map< tree_key_t,node_t >::key_type const &)*arg2); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_erase__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_erase" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_node_erase" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_node_erase" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::iterator""'"); + } + } + std_map_Sl_tree_key_t_Sc_node_t_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_erase__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::iterator arg2 ; + std::map< tree_key_t,node_t >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_erase" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_node_erase" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_node_erase" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_node_erase" "', argument " "3"" of type '" "std::map< tree_key_t,node_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "map_key_node_erase" "', argument " "3"" of type '" "std::map< tree_key_t,node_t >::iterator""'"); + } + } + std_map_Sl_tree_key_t_Sc_node_t_Sg__erase__SWIG_2(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "map_key_node_erase", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_tree_key_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_map_key_node_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_map_key_node_erase__SWIG_1(self, argc, argv); + case 3: + return _wrap_map_key_node_erase__SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'map_key_node_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::map< tree_key_t,node_t >::erase(std::map< tree_key_t,node_t >::key_type const &)\n" + " std::map< tree_key_t,node_t >::erase(std::map< tree_key_t,node_t >::iterator)\n" + " std::map< tree_key_t,node_t >::erase(std::map< tree_key_t,node_t >::iterator,std::map< tree_key_t,node_t >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_find(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + std::map< tree_key_t,node_t >::iterator result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_node_find", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_find" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node_find" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node_find" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + result = (arg1)->find((std::map< tree_key_t,node_t >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_lower_bound(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + std::map< tree_key_t,node_t >::iterator result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_node_lower_bound", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_lower_bound" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node_lower_bound" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node_lower_bound" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + result = (arg1)->lower_bound((std::map< tree_key_t,node_t >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_map_key_node_upper_bound(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + std::map< tree_key_t,node_t >::key_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + std::map< tree_key_t,node_t >::iterator result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:map_key_node_upper_bound", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "map_key_node_upper_bound" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "map_key_node_upper_bound" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "map_key_node_upper_bound" "', argument " "2"" of type '" "std::map< tree_key_t,node_t >::key_type const &""'"); + } + arg2 = reinterpret_cast< std::map< tree_key_t,node_t >::key_type * >(argp2); + result = (arg1)->upper_bound((std::map< tree_key_t,node_t >::key_type const &)*arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::map< tree_key_t,node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_map_key_node(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::map< tree_key_t,node_t > *arg1 = (std::map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_map_key_node" "', argument " "1"" of type '" "std::map< tree_key_t,node_t > *""'"); + } + arg1 = reinterpret_cast< std::map< tree_key_t,node_t > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *map_key_node_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *map_key_node_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_vector_polymorphism_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_iterator" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_poly_t_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___nonzero__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___nonzero__" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (bool)std_vector_Sl_poly_t_Sg____nonzero__((std::vector< poly_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___bool__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___bool__" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (bool)std_vector_Sl_poly_t_Sg____bool__((std::vector< poly_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___len__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___len__" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = std_vector_Sl_poly_t_Sg____len__((std::vector< poly_t > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___getslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::difference_type arg2 ; + std::vector< poly_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + std::vector< poly_t,std::allocator< poly_t > > *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_polymorphism___getslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___getslice__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism___getslice__" "', argument " "2"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_polymorphism___getslice__" "', argument " "3"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< poly_t >::difference_type >(val3); + try { + result = (std::vector< poly_t,std::allocator< poly_t > > *)std_vector_Sl_poly_t_Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_poly_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___setslice____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::difference_type arg2 ; + std::vector< poly_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___setslice__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism___setslice__" "', argument " "2"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_polymorphism___setslice__" "', argument " "3"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< poly_t >::difference_type >(val3); + try { + std_vector_Sl_poly_t_Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___setslice____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::difference_type arg2 ; + std::vector< poly_t >::difference_type arg3 ; + std::vector< poly_t,std::allocator< poly_t > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___setslice__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism___setslice__" "', argument " "2"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_polymorphism___setslice__" "', argument " "3"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< poly_t >::difference_type >(val3); + { + std::vector< poly_t,std::allocator< poly_t > > *ptr = (std::vector< poly_t,std::allocator< poly_t > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_polymorphism___setslice__" "', argument " "4"" of type '" "std::vector< poly_t,std::allocator< poly_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism___setslice__" "', argument " "4"" of type '" "std::vector< poly_t,std::allocator< poly_t > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_poly_t_Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< poly_t,std::allocator< poly_t > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_polymorphism___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[3], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_polymorphism___setslice____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_polymorphism___setslice____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_polymorphism___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< poly_t >::__setslice__(std::vector< poly_t >::difference_type,std::vector< poly_t >::difference_type)\n" + " std::vector< poly_t >::__setslice__(std::vector< poly_t >::difference_type,std::vector< poly_t >::difference_type,std::vector< poly_t,std::allocator< poly_t > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___delslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::difference_type arg2 ; + std::vector< poly_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_polymorphism___delslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___delslice__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism___delslice__" "', argument " "2"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_polymorphism___delslice__" "', argument " "3"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< poly_t >::difference_type >(val3); + try { + std_vector_Sl_poly_t_Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___delitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___delitem__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism___delitem__" "', argument " "2"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::difference_type >(val2); + try { + std_vector_Sl_poly_t_Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< poly_t,std::allocator< poly_t > > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___getitem__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + result = (std::vector< poly_t,std::allocator< poly_t > > *)std_vector_Sl_poly_t_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_poly_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + std::vector< poly_t,std::allocator< poly_t > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___setitem__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + { + std::vector< poly_t,std::allocator< poly_t > > *ptr = (std::vector< poly_t,std::allocator< poly_t > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_polymorphism___setitem__" "', argument " "3"" of type '" "std::vector< poly_t,std::allocator< poly_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism___setitem__" "', argument " "3"" of type '" "std::vector< poly_t,std::allocator< poly_t > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_poly_t_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< poly_t,std::allocator< poly_t > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___setitem__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_poly_t_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___delitem__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_poly_t_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_polymorphism___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_polymorphism___delitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_polymorphism___delitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_polymorphism___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< poly_t >::__delitem__(std::vector< poly_t >::difference_type)\n" + " std::vector< poly_t >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___getitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< poly_t >::value_type *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___getitem__" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism___getitem__" "', argument " "2"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::difference_type >(val2); + try { + result = (std::vector< poly_t >::value_type *) &std_vector_Sl_poly_t_Sg____getitem____SWIG_1((std::vector< poly_t > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poly_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_polymorphism___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_polymorphism___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_polymorphism___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_polymorphism___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< poly_t >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< poly_t >::__getitem__(std::vector< poly_t >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___setitem____SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::difference_type arg2 ; + std::vector< poly_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism___setitem__" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism___setitem__" "', argument " "2"" of type '" "std::vector< poly_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::difference_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_poly_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_polymorphism___setitem__" "', argument " "3"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism___setitem__" "', argument " "3"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< poly_t >::value_type * >(argp3); + try { + std_vector_Sl_poly_t_Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(poly_t const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_polymorphism___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[2], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_poly_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_polymorphism___setitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_polymorphism___setitem____SWIG_0(self, argc, argv); + case 3: + return _wrap_vector_polymorphism___setitem____SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_polymorphism___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< poly_t >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< poly_t,std::allocator< poly_t > > const &)\n" + " std::vector< poly_t >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< poly_t >::__setitem__(std::vector< poly_t >::difference_type,std::vector< poly_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_pop(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::value_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_pop" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + try { + result = std_vector_Sl_poly_t_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj((new std::vector< poly_t >::value_type(result)), SWIGTYPE_p_poly_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_append(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_polymorphism_append", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_append" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_poly_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_polymorphism_append" "', argument " "2"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism_append" "', argument " "2"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< poly_t >::value_type * >(argp2); + std_vector_Sl_poly_t_Sg__append(arg1,(poly_t const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_polymorphism__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< poly_t > *result = 0 ; + + (void)self; + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< poly_t > *)new std::vector< poly_t >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_poly_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_polymorphism__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< poly_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< poly_t,std::allocator< poly_t > > *ptr = (std::vector< poly_t,std::allocator< poly_t > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vector_polymorphism" "', argument " "1"" of type '" "std::vector< poly_t > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_vector_polymorphism" "', argument " "1"" of type '" "std::vector< poly_t > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< poly_t > *)new std::vector< poly_t >((std::vector< poly_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_poly_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_empty(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_empty" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (bool)((std::vector< poly_t > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_size(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_size" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = ((std::vector< poly_t > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_swap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"v", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_polymorphism_swap", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_swap" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_poly_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_polymorphism_swap" "', argument " "2"" of type '" "std::vector< poly_t > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism_swap" "', argument " "2"" of type '" "std::vector< poly_t > &""'"); + } + arg2 = reinterpret_cast< std::vector< poly_t > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_begin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_begin" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< poly_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_end(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_end" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< poly_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_rbegin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_rbegin" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< poly_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_rend(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_rend" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< poly_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_clear(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_clear" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_get_allocator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< poly_t > > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_get_allocator" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = ((std::vector< poly_t > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< poly_t >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_poly_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_polymorphism__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< poly_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_polymorphism" "', argument " "1"" of type '" "std::vector< poly_t >::size_type""'"); + } + arg1 = static_cast< std::vector< poly_t >::size_type >(val1); + result = (std::vector< poly_t > *)new std::vector< poly_t >(SWIG_STD_MOVE(arg1)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_poly_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_pop_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_pop_back" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_resize__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_resize" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism_resize" "', argument " "2"" of type '" "std::vector< poly_t >::size_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::size_type >(val2); + (arg1)->resize(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_erase__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< poly_t >::iterator result; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_erase" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_erase" "', argument " "2"" of type '" "std::vector< poly_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_erase" "', argument " "2"" of type '" "std::vector< poly_t >::iterator""'"); + } + } + result = std_vector_Sl_poly_t_Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< poly_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_erase__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::iterator arg2 ; + std::vector< poly_t >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< poly_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_erase" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_erase" "', argument " "2"" of type '" "std::vector< poly_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_erase" "', argument " "2"" of type '" "std::vector< poly_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_erase" "', argument " "3"" of type '" "std::vector< poly_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_erase" "', argument " "3"" of type '" "std::vector< poly_t >::iterator""'"); + } + } + result = std_vector_Sl_poly_t_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< poly_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_polymorphism_erase", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_polymorphism_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_polymorphism_erase__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_polymorphism_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< poly_t >::erase(std::vector< poly_t >::iterator)\n" + " std::vector< poly_t >::erase(std::vector< poly_t >::iterator,std::vector< poly_t >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_vector_polymorphism__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t >::size_type arg1 ; + std::vector< poly_t >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::vector< poly_t > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_polymorphism" "', argument " "1"" of type '" "std::vector< poly_t >::size_type""'"); + } + arg1 = static_cast< std::vector< poly_t >::size_type >(val1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_poly_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_vector_polymorphism" "', argument " "2"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_vector_polymorphism" "', argument " "2"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< poly_t >::value_type * >(argp2); + result = (std::vector< poly_t > *)new std::vector< poly_t >(SWIG_STD_MOVE(arg1),(std::vector< poly_t >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_poly_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_polymorphism(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_vector_polymorphism", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_poly_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_vector_polymorphism__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_vector_polymorphism__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_vector_polymorphism__SWIG_1(self, argc, argv); + case 4: + return _wrap_new_vector_polymorphism__SWIG_3(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_vector_polymorphism'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< poly_t >::vector()\n" + " std::vector< poly_t >::vector(std::vector< poly_t > const &)\n" + " std::vector< poly_t >::vector(std::vector< poly_t >::size_type)\n" + " std::vector< poly_t >::vector(std::vector< poly_t >::size_type,std::vector< poly_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_push_back(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_polymorphism_push_back", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_push_back" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_poly_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_polymorphism_push_back" "', argument " "2"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism_push_back" "', argument " "2"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< poly_t >::value_type * >(argp2); + (arg1)->push_back((std::vector< poly_t >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_front(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_front" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (std::vector< poly_t >::value_type *) &((std::vector< poly_t > const *)arg1)->front(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poly_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_back" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = (std::vector< poly_t >::value_type *) &((std::vector< poly_t > const *)arg1)->back(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poly_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_assign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::size_type arg2 ; + std::vector< poly_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_polymorphism_assign", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_assign" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism_assign" "', argument " "2"" of type '" "std::vector< poly_t >::size_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_poly_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_polymorphism_assign" "', argument " "3"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism_assign" "', argument " "3"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< poly_t >::value_type * >(argp3); + (arg1)->assign(SWIG_STD_MOVE(arg2),(std::vector< poly_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_resize__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::size_type arg2 ; + std::vector< poly_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_resize" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism_resize" "', argument " "2"" of type '" "std::vector< poly_t >::size_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_poly_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_polymorphism_resize" "', argument " "3"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism_resize" "', argument " "3"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< poly_t >::value_type * >(argp3); + (arg1)->resize(SWIG_STD_MOVE(arg2),(std::vector< poly_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_polymorphism_resize", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_poly_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_polymorphism_resize__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_polymorphism_resize__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_polymorphism_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< poly_t >::resize(std::vector< poly_t >::size_type)\n" + " std::vector< poly_t >::resize(std::vector< poly_t >::size_type,std::vector< poly_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_insert__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::iterator arg2 ; + std::vector< poly_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + std::vector< poly_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_insert" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_insert" "', argument " "2"" of type '" "std::vector< poly_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_insert" "', argument " "2"" of type '" "std::vector< poly_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_poly_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_polymorphism_insert" "', argument " "3"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism_insert" "', argument " "3"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< poly_t >::value_type * >(argp3); + result = std_vector_Sl_poly_t_Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(poly_t const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< poly_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_insert__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::iterator arg2 ; + std::vector< poly_t >::size_type arg3 ; + std::vector< poly_t >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_insert" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_insert" "', argument " "2"" of type '" "std::vector< poly_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_polymorphism_insert" "', argument " "2"" of type '" "std::vector< poly_t >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_polymorphism_insert" "', argument " "3"" of type '" "std::vector< poly_t >::size_type""'"); + } + arg3 = static_cast< std::vector< poly_t >::size_type >(val3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_poly_t, 0 | 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_polymorphism_insert" "', argument " "4"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_polymorphism_insert" "', argument " "4"" of type '" "std::vector< poly_t >::value_type const &""'"); + } + arg4 = reinterpret_cast< std::vector< poly_t >::value_type * >(argp4); + std_vector_Sl_poly_t_Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(poly_t const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_polymorphism_insert", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_poly_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< poly_t,std::allocator< poly_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_poly_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_polymorphism_insert__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_polymorphism_insert__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_polymorphism_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< poly_t >::insert(std::vector< poly_t >::iterator,std::vector< poly_t >::value_type const &)\n" + " std::vector< poly_t >::insert(std::vector< poly_t >::iterator,std::vector< poly_t >::size_type,std::vector< poly_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_reserve(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + std::vector< poly_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_polymorphism_reserve", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_reserve" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_polymorphism_reserve" "', argument " "2"" of type '" "std::vector< poly_t >::size_type""'"); + } + arg2 = static_cast< std::vector< poly_t >::size_type >(val2); + (arg1)->reserve(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_polymorphism_capacity(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< poly_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_polymorphism_capacity" "', argument " "1"" of type '" "std::vector< poly_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + result = ((std::vector< poly_t > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_vector_polymorphism(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< poly_t > *arg1 = (std::vector< poly_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_poly_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_polymorphism" "', argument " "1"" of type '" "std::vector< poly_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< poly_t > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *vector_polymorphism_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_poly_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *vector_polymorphism_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_vector_tree_node_iterator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + + arg2 = &swig_obj[0]; + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_iterator" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (swig::SwigPyIterator *)std_vector_Sl_node_t_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___nonzero__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___nonzero__" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (bool)std_vector_Sl_node_t_Sg____nonzero__((std::vector< node_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___bool__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___bool__" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (bool)std_vector_Sl_node_t_Sg____bool__((std::vector< node_t > const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___len__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___len__" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = std_vector_Sl_node_t_Sg____len__((std::vector< node_t > const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___getslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::difference_type arg2 ; + std::vector< node_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + std::vector< node_t,std::allocator< node_t > > *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_tree_node___getslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___getslice__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node___getslice__" "', argument " "2"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< node_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_node___getslice__" "', argument " "3"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< node_t >::difference_type >(val3); + try { + result = (std::vector< node_t,std::allocator< node_t > > *)std_vector_Sl_node_t_Sg____getslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_node_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___setslice____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::difference_type arg2 ; + std::vector< node_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___setslice__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node___setslice__" "', argument " "2"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< node_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_node___setslice__" "', argument " "3"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< node_t >::difference_type >(val3); + try { + std_vector_Sl_node_t_Sg____setslice____SWIG_0(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___setslice____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::difference_type arg2 ; + std::vector< node_t >::difference_type arg3 ; + std::vector< node_t,std::allocator< node_t > > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___setslice__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node___setslice__" "', argument " "2"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< node_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_node___setslice__" "', argument " "3"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< node_t >::difference_type >(val3); + { + std::vector< node_t,std::allocator< node_t > > *ptr = (std::vector< node_t,std::allocator< node_t > > *)0; + res4 = swig::asptr(swig_obj[3], &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_tree_node___setslice__" "', argument " "4"" of type '" "std::vector< node_t,std::allocator< node_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node___setslice__" "', argument " "4"" of type '" "std::vector< node_t,std::allocator< node_t > > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_node_t_Sg____setslice____SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(std::vector< node_t,std::allocator< node_t > > const &)*arg4); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___setslice__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_node___setslice__", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[3], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_node___setslice____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_node___setslice____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_node___setslice__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< node_t >::__setslice__(std::vector< node_t >::difference_type,std::vector< node_t >::difference_type)\n" + " std::vector< node_t >::__setslice__(std::vector< node_t >::difference_type,std::vector< node_t >::difference_type,std::vector< node_t,std::allocator< node_t > > const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___delslice__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::difference_type arg2 ; + std::vector< node_t >::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", (char *)"j", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_tree_node___delslice__", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___delslice__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node___delslice__" "', argument " "2"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< node_t >::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_node___delslice__" "', argument " "3"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg3 = static_cast< std::vector< node_t >::difference_type >(val3); + try { + std_vector_Sl_node_t_Sg____delslice__(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___delitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___delitem__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node___delitem__" "', argument " "2"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< node_t >::difference_type >(val2); + try { + std_vector_Sl_node_t_Sg____delitem____SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___getitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< node_t,std::allocator< node_t > > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___getitem__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node___getitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + result = (std::vector< node_t,std::allocator< node_t > > *)std_vector_Sl_node_t_Sg____getitem____SWIG_0(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_node_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___setitem____SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + std::vector< node_t,std::allocator< node_t > > *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 = SWIG_OLDOBJ ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___setitem__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + { + std::vector< node_t,std::allocator< node_t > > *ptr = (std::vector< node_t,std::allocator< node_t > > *)0; + res3 = swig::asptr(swig_obj[2], &ptr); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_node___setitem__" "', argument " "3"" of type '" "std::vector< node_t,std::allocator< node_t > > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node___setitem__" "', argument " "3"" of type '" "std::vector< node_t,std::allocator< node_t > > const &""'"); + } + arg3 = ptr; + } + try { + std_vector_Sl_node_t_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< node_t,std::allocator< node_t > > const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res3)) delete arg3; + return resultobj; +fail: + if (SWIG_IsNewObj(res3)) delete arg3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___setitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___setitem__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node___setitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_node_t_Sg____setitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___delitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + SWIGPY_SLICEOBJECT *arg2 = (SWIGPY_SLICEOBJECT *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___delitem__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + { + if (!PySlice_Check(swig_obj[1])) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node___delitem__" "', argument " "2"" of type '" "SWIGPY_SLICEOBJECT *""'"); + } + arg2 = (SWIGPY_SLICEOBJECT *) swig_obj[1]; + } + try { + std_vector_Sl_node_t_Sg____delitem____SWIG_1(arg1,arg2); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___delitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_node___delitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_node___delitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_tree_node___delitem____SWIG_0(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_node___delitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< node_t >::__delitem__(std::vector< node_t >::difference_type)\n" + " std::vector< node_t >::__delitem__(SWIGPY_SLICEOBJECT *)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___getitem____SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector< node_t >::value_type *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___getitem__" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node___getitem__" "', argument " "2"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< node_t >::difference_type >(val2); + try { + result = (std::vector< node_t >::value_type *) &std_vector_Sl_node_t_Sg____getitem____SWIG_1((std::vector< node_t > const *)arg1,SWIG_STD_MOVE(arg2)); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_node_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___getitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_node___getitem__", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_node___getitem____SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_node___getitem____SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_node___getitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< node_t >::__getitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< node_t >::__getitem__(std::vector< node_t >::difference_type) const\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___setitem____SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::difference_type arg2 ; + std::vector< node_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node___setitem__" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node___setitem__" "', argument " "2"" of type '" "std::vector< node_t >::difference_type""'"); + } + arg2 = static_cast< std::vector< node_t >::difference_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_node_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_node___setitem__" "', argument " "3"" of type '" "std::vector< node_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node___setitem__" "', argument " "3"" of type '" "std::vector< node_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< node_t >::value_type * >(argp3); + try { + std_vector_Sl_node_t_Sg____setitem____SWIG_2(arg1,SWIG_STD_MOVE(arg2),(node_t const &)*arg3); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node___setitem__(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_node___setitem__", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + _v = PySlice_Check(argv[1]); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = swig::asptr(argv[2], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_node_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_node___setitem____SWIG_1(self, argc, argv); + case 2: + return _wrap_vector_tree_node___setitem____SWIG_0(self, argc, argv); + case 3: + return _wrap_vector_tree_node___setitem____SWIG_2(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_node___setitem__'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< node_t >::__setitem__(SWIGPY_SLICEOBJECT *,std::vector< node_t,std::allocator< node_t > > const &)\n" + " std::vector< node_t >::__setitem__(SWIGPY_SLICEOBJECT *)\n" + " std::vector< node_t >::__setitem__(std::vector< node_t >::difference_type,std::vector< node_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_pop(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::value_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_pop" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + try { + result = std_vector_Sl_node_t_Sg__pop(arg1); + } catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + resultobj = SWIG_NewPointerObj((new std::vector< node_t >::value_type(result)), SWIGTYPE_p_node_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_append(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_node_append", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_append" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_node_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_tree_node_append" "', argument " "2"" of type '" "std::vector< node_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node_append" "', argument " "2"" of type '" "std::vector< node_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< node_t >::value_type * >(argp2); + std_vector_Sl_node_t_Sg__append(arg1,(node_t const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_node__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) { + PyObject *resultobj = 0; + std::vector< node_t > *result = 0 ; + + (void)self; + if ((nobjs < 0) || (nobjs > 0)) SWIG_fail; + result = (std::vector< node_t > *)new std::vector< node_t >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_node_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_node__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + std::vector< node_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + std::vector< node_t,std::allocator< node_t > > *ptr = (std::vector< node_t,std::allocator< node_t > > *)0; + res1 = swig::asptr(swig_obj[0], &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vector_tree_node" "', argument " "1"" of type '" "std::vector< node_t > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_vector_tree_node" "', argument " "1"" of type '" "std::vector< node_t > const &""'"); + } + arg1 = ptr; + } + result = (std::vector< node_t > *)new std::vector< node_t >((std::vector< node_t > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_node_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_empty(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_empty" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (bool)((std::vector< node_t > const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_size(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_size" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = ((std::vector< node_t > const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_swap(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"v", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_node_swap", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_swap" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_node_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_tree_node_swap" "', argument " "2"" of type '" "std::vector< node_t > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node_swap" "', argument " "2"" of type '" "std::vector< node_t > &""'"); + } + arg2 = reinterpret_cast< std::vector< node_t > * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_begin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_begin" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_end(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_end" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_rbegin(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_rbegin" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< node_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_rend(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::reverse_iterator result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_rend" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< node_t >::reverse_iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_clear(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_clear" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_get_allocator(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + SwigValueWrapper< std::allocator< node_t > > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_get_allocator" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = ((std::vector< node_t > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< node_t >::allocator_type(result)), SWIGTYPE_p_std__allocatorT_node_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_node__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t >::size_type arg1 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector< node_t > *result = 0 ; + + (void)self; + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_tree_node" "', argument " "1"" of type '" "std::vector< node_t >::size_type""'"); + } + arg1 = static_cast< std::vector< node_t >::size_type >(val1); + result = (std::vector< node_t > *)new std::vector< node_t >(SWIG_STD_MOVE(arg1)); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_node_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_pop_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_pop_back" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_resize__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_resize" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node_resize" "', argument " "2"" of type '" "std::vector< node_t >::size_type""'"); + } + arg2 = static_cast< std::vector< node_t >::size_type >(val2); + (arg1)->resize(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_erase__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + std::vector< node_t >::iterator result; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_erase" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_erase" "', argument " "2"" of type '" "std::vector< node_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_erase" "', argument " "2"" of type '" "std::vector< node_t >::iterator""'"); + } + } + result = std_vector_Sl_node_t_Sg__erase__SWIG_0(arg1,SWIG_STD_MOVE(arg2)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_erase__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::iterator arg2 ; + std::vector< node_t >::iterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + swig::SwigPyIterator *iter3 = 0 ; + int res3 ; + std::vector< node_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_erase" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_erase" "', argument " "2"" of type '" "std::vector< node_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_erase" "', argument " "2"" of type '" "std::vector< node_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_erase" "', argument " "3"" of type '" "std::vector< node_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_erase" "', argument " "3"" of type '" "std::vector< node_t >::iterator""'"); + } + } + result = std_vector_Sl_node_t_Sg__erase__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_erase(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_node_erase", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_node_erase__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_node_erase__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_node_erase'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< node_t >::erase(std::vector< node_t >::iterator)\n" + " std::vector< node_t >::erase(std::vector< node_t >::iterator,std::vector< node_t >::iterator)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_node__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t >::size_type arg1 ; + std::vector< node_t >::value_type *arg2 = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + std::vector< node_t > *result = 0 ; + + (void)self; + if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vector_tree_node" "', argument " "1"" of type '" "std::vector< node_t >::size_type""'"); + } + arg1 = static_cast< std::vector< node_t >::size_type >(val1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_node_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_vector_tree_node" "', argument " "2"" of type '" "std::vector< node_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "new_vector_tree_node" "', argument " "2"" of type '" "std::vector< node_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< node_t >::value_type * >(argp2); + result = (std::vector< node_t > *)new std::vector< node_t >(SWIG_STD_MOVE(arg1),(std::vector< node_t >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_node_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vector_tree_node(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "new_vector_tree_node", 0, 2, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (argc == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_node_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + return _wrap_new_vector_tree_node__SWIG_0(self, argc, argv); + case 2: + return _wrap_new_vector_tree_node__SWIG_2(self, argc, argv); + case 3: + return _wrap_new_vector_tree_node__SWIG_1(self, argc, argv); + case 4: + return _wrap_new_vector_tree_node__SWIG_3(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_vector_tree_node'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< node_t >::vector()\n" + " std::vector< node_t >::vector(std::vector< node_t > const &)\n" + " std::vector< node_t >::vector(std::vector< node_t >::size_type)\n" + " std::vector< node_t >::vector(std::vector< node_t >::size_type,std::vector< node_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_push_back(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_node_push_back", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_push_back" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_node_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector_tree_node_push_back" "', argument " "2"" of type '" "std::vector< node_t >::value_type const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node_push_back" "', argument " "2"" of type '" "std::vector< node_t >::value_type const &""'"); + } + arg2 = reinterpret_cast< std::vector< node_t >::value_type * >(argp2); + (arg1)->push_back((std::vector< node_t >::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_front(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_front" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (std::vector< node_t >::value_type *) &((std::vector< node_t > const *)arg1)->front(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_node_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_back(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::value_type *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_back" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = (std::vector< node_t >::value_type *) &((std::vector< node_t > const *)arg1)->back(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_node_t, 0 | 0 ); + (void)swig::container_owner::value_type>::category>::back_reference(resultobj, swig_obj[0]); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_assign(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::size_type arg2 ; + std::vector< node_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", (char *)"x", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:vector_tree_node_assign", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_assign" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node_assign" "', argument " "2"" of type '" "std::vector< node_t >::size_type""'"); + } + arg2 = static_cast< std::vector< node_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_node_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_node_assign" "', argument " "3"" of type '" "std::vector< node_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node_assign" "', argument " "3"" of type '" "std::vector< node_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< node_t >::value_type * >(argp3); + (arg1)->assign(SWIG_STD_MOVE(arg2),(std::vector< node_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_resize__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::size_type arg2 ; + std::vector< node_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_resize" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node_resize" "', argument " "2"" of type '" "std::vector< node_t >::size_type""'"); + } + arg2 = static_cast< std::vector< node_t >::size_type >(val2); + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_node_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_node_resize" "', argument " "3"" of type '" "std::vector< node_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node_resize" "', argument " "3"" of type '" "std::vector< node_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< node_t >::value_type * >(argp3); + (arg1)->resize(SWIG_STD_MOVE(arg2),(std::vector< node_t >::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_resize(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[4] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_node_resize", 0, 3, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_node_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_node_resize__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_node_resize__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_node_resize'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< node_t >::resize(std::vector< node_t >::size_type)\n" + " std::vector< node_t >::resize(std::vector< node_t >::size_type,std::vector< node_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_insert__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::iterator arg2 ; + std::vector< node_t >::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + std::vector< node_t >::iterator result; + + (void)self; + if ((nobjs < 3) || (nobjs > 3)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_insert" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_insert" "', argument " "2"" of type '" "std::vector< node_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_insert" "', argument " "2"" of type '" "std::vector< node_t >::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_node_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vector_tree_node_insert" "', argument " "3"" of type '" "std::vector< node_t >::value_type const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node_insert" "', argument " "3"" of type '" "std::vector< node_t >::value_type const &""'"); + } + arg3 = reinterpret_cast< std::vector< node_t >::value_type * >(argp3); + result = std_vector_Sl_node_t_Sg__insert__SWIG_0(arg1,SWIG_STD_MOVE(arg2),(node_t const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< node_t >::iterator & >(result)), + swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_insert__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::iterator arg2 ; + std::vector< node_t >::size_type arg3 ; + std::vector< node_t >::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + + (void)self; + if ((nobjs < 4) || (nobjs > 4)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_insert" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_insert" "', argument " "2"" of type '" "std::vector< node_t >::iterator""'"); + } else { + swig::SwigPyIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vector_tree_node_insert" "', argument " "2"" of type '" "std::vector< node_t >::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vector_tree_node_insert" "', argument " "3"" of type '" "std::vector< node_t >::size_type""'"); + } + arg3 = static_cast< std::vector< node_t >::size_type >(val3); + res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_node_t, 0 | 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vector_tree_node_insert" "', argument " "4"" of type '" "std::vector< node_t >::value_type const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "vector_tree_node_insert" "', argument " "4"" of type '" "std::vector< node_t >::value_type const &""'"); + } + arg4 = reinterpret_cast< std::vector< node_t >::value_type * >(argp4); + std_vector_Sl_node_t_Sg__insert__SWIG_1(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3),(node_t const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_insert(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[5] = { + 0 + }; + + if (!(argc = SWIG_Python_UnpackTuple(args, "vector_tree_node_insert", 0, 4, argv))) SWIG_fail; + --argc; + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (argc == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_node_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (argc == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = swig::asptr(argv[0], (std::vector< node_t,std::allocator< node_t > >**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + swig::SwigPyIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_node_t, SWIG_POINTER_NO_NULL | 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + return _wrap_vector_tree_node_insert__SWIG_0(self, argc, argv); + case 2: + return _wrap_vector_tree_node_insert__SWIG_1(self, argc, argv); + } + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vector_tree_node_insert'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< node_t >::insert(std::vector< node_t >::iterator,std::vector< node_t >::value_type const &)\n" + " std::vector< node_t >::insert(std::vector< node_t >::iterator,std::vector< node_t >::size_type,std::vector< node_t >::value_type const &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_reserve(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + std::vector< node_t >::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:vector_tree_node_reserve", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_reserve" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector_tree_node_reserve" "', argument " "2"" of type '" "std::vector< node_t >::size_type""'"); + } + arg2 = static_cast< std::vector< node_t >::size_type >(val2); + (arg1)->reserve(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vector_tree_node_capacity(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::vector< node_t >::size_type result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector_tree_node_capacity" "', argument " "1"" of type '" "std::vector< node_t > const *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + result = ((std::vector< node_t > const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_vector_tree_node(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + std::vector< node_t > *arg1 = (std::vector< node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_std__vectorT_node_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector_tree_node" "', argument " "1"" of type '" "std::vector< node_t > *""'"); + } + arg1 = reinterpret_cast< std::vector< node_t > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *vector_tree_node_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_node_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *vector_tree_node_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_index_value_pair_index_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + index_value_pair_t *arg1 = (index_value_pair_t *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "index_value_pair_index_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_value_pair_index_set" "', argument " "1"" of type '" "index_value_pair_t *""'"); + } + arg1 = reinterpret_cast< index_value_pair_t * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_value_pair_index_set" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + if (arg1) (arg1)->index = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_index_value_pair_index_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + index_value_pair_t *arg1 = (index_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_value_pair_index_get" "', argument " "1"" of type '" "index_value_pair_t *""'"); + } + arg1 = reinterpret_cast< index_value_pair_t * >(argp1); + result = ((arg1)->index); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_index_value_pair_val_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + index_value_pair_t *arg1 = (index_value_pair_t *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "index_value_pair_val_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_value_pair_val_set" "', argument " "1"" of type '" "index_value_pair_t *""'"); + } + arg1 = reinterpret_cast< index_value_pair_t * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_value_pair_val_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->val = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_index_value_pair_val_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + index_value_pair_t *arg1 = (index_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_value_pair_val_get" "', argument " "1"" of type '" "index_value_pair_t *""'"); + } + arg1 = reinterpret_cast< index_value_pair_t * >(argp1); + result = (double) ((arg1)->val); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_index_value_pair(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + double arg2 = (double) 0 ; + int val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"index_in", (char *)"val_in", NULL + }; + index_value_pair_t *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_index_value_pair", kwnames, &obj0, &obj1)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_index_value_pair" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_index_value_pair" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + result = (index_value_pair_t *)new index_value_pair_t(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_index_value_pair_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_index_value_pair___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + index_value_pair_t *arg1 = (index_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_value_pair___str__" "', argument " "1"" of type '" "index_value_pair_t *""'"); + } + arg1 = reinterpret_cast< index_value_pair_t * >(argp1); + result = (char *)index_value_pair_t___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_index_value_pair___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + index_value_pair_t *arg1 = (index_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_value_pair___repr__" "', argument " "1"" of type '" "index_value_pair_t *""'"); + } + arg1 = reinterpret_cast< index_value_pair_t * >(argp1); + result = (char *)index_value_pair_t___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_index_value_pair(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + index_value_pair_t *arg1 = (index_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_value_pair_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_index_value_pair" "', argument " "1"" of type '" "index_value_pair_t *""'"); + } + arg1 = reinterpret_cast< index_value_pair_t * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *index_value_pair_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_index_value_pair_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *index_value_pair_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_genotype_value_pair_genotype_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + genotype_value_pair_t *arg1 = (genotype_value_pair_t *) 0 ; + boost::dynamic_bitset< > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + boost::dynamic_bitset< > temp2 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "genotype_value_pair_genotype_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_genotype_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "genotype_value_pair_genotype_set" "', argument " "1"" of type '" "genotype_value_pair_t *""'"); + } + arg1 = reinterpret_cast< genotype_value_pair_t * >(argp1); + { + /* Ensure input is a Python sequence */ + PyObject *tmplist = PySequence_Fast(swig_obj[1], "I expected a sequence"); + unsigned long L = PySequence_Length(tmplist); + + /* Create boost::dynamic_bitset from Python list */ + temp2.resize(L); + long tmplong; + for(size_t i=0; i < L; i++) { + tmplong = PyInt_AsLong(PySequence_Fast_GET_ITEM(tmplist, i)); + if(tmplong < 0) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of bool."); + SWIG_fail; + } + temp2[i] = (bool)tmplong; + } + arg2 = temp2; + } + if (arg1) (arg1)->genotype = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_genotype_value_pair_genotype_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + genotype_value_pair_t *arg1 = (genotype_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + boost::dynamic_bitset< > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_genotype_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "genotype_value_pair_genotype_get" "', argument " "1"" of type '" "genotype_value_pair_t *""'"); + } + arg1 = reinterpret_cast< genotype_value_pair_t * >(argp1); + result = ((arg1)->genotype); + { + unsigned long L = (&result)->size(); + npy_intp dims[1] = { + (npy_intp) L + }; + auto *array = reinterpret_cast(PyArray_ZEROS(1, dims, NPY_BOOL, 0)); + if (!array) SWIG_fail; + + /* no checks on memory alignments, since we create a new array */ + bool *ptr = (bool *)PyArray_DATA(array); + for(int i=0; i < L; i++, ptr++) + if((&result)->test(i)) + *ptr = true; + resultobj = reinterpret_cast(array); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_genotype_value_pair_val_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + genotype_value_pair_t *arg1 = (genotype_value_pair_t *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "genotype_value_pair_val_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_genotype_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "genotype_value_pair_val_set" "', argument " "1"" of type '" "genotype_value_pair_t *""'"); + } + arg1 = reinterpret_cast< genotype_value_pair_t * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "genotype_value_pair_val_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->val = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_genotype_value_pair_val_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + genotype_value_pair_t *arg1 = (genotype_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_genotype_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "genotype_value_pair_val_get" "', argument " "1"" of type '" "genotype_value_pair_t *""'"); + } + arg1 = reinterpret_cast< genotype_value_pair_t * >(argp1); + result = (double) ((arg1)->val); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_genotype_value_pair(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + boost::dynamic_bitset< > arg1 = (boost::dynamic_bitset< >) boost::dynamic_bitset< >(0) ; + double arg2 = (double) 0 ; + boost::dynamic_bitset< > temp1 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"genotype_in", (char *)"val_in", NULL + }; + genotype_value_pair_t *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_genotype_value_pair", kwnames, &obj0, &obj1)) SWIG_fail; + if (obj0) { + { + /* Ensure input is a Python sequence */ + PyObject *tmplist = PySequence_Fast(obj0, "I expected a sequence"); + unsigned long L = PySequence_Length(tmplist); + + /* Create boost::dynamic_bitset from Python list */ + temp1.resize(L); + long tmplong; + for(size_t i=0; i < L; i++) { + tmplong = PyInt_AsLong(PySequence_Fast_GET_ITEM(tmplist, i)); + if(tmplong < 0) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of bool."); + SWIG_fail; + } + temp1[i] = (bool)tmplong; + } + arg1 = temp1; + } + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_genotype_value_pair" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + result = (genotype_value_pair_t *)new genotype_value_pair_t(SWIG_STD_MOVE(arg1),arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_genotype_value_pair_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_genotype_value_pair___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + genotype_value_pair_t *arg1 = (genotype_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_genotype_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "genotype_value_pair___str__" "', argument " "1"" of type '" "genotype_value_pair_t *""'"); + } + arg1 = reinterpret_cast< genotype_value_pair_t * >(argp1); + result = (char *)genotype_value_pair_t___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_genotype_value_pair___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + genotype_value_pair_t *arg1 = (genotype_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_genotype_value_pair_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "genotype_value_pair___repr__" "', argument " "1"" of type '" "genotype_value_pair_t *""'"); + } + arg1 = reinterpret_cast< genotype_value_pair_t * >(argp1); + result = (char *)genotype_value_pair_t___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_genotype_value_pair(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + genotype_value_pair_t *arg1 = (genotype_value_pair_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_genotype_value_pair_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_genotype_value_pair" "', argument " "1"" of type '" "genotype_value_pair_t *""'"); + } + arg1 = reinterpret_cast< genotype_value_pair_t * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *genotype_value_pair_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_genotype_value_pair_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *genotype_value_pair_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_stat_mean_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + stat_t *arg1 = (stat_t *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "stat_mean_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stat_mean_set" "', argument " "1"" of type '" "stat_t *""'"); + } + arg1 = reinterpret_cast< stat_t * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "stat_mean_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->mean = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_stat_mean_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + stat_t *arg1 = (stat_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stat_mean_get" "', argument " "1"" of type '" "stat_t *""'"); + } + arg1 = reinterpret_cast< stat_t * >(argp1); + result = (double) ((arg1)->mean); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_stat_variance_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + stat_t *arg1 = (stat_t *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "stat_variance_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stat_variance_set" "', argument " "1"" of type '" "stat_t *""'"); + } + arg1 = reinterpret_cast< stat_t * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "stat_variance_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->variance = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_stat_variance_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + stat_t *arg1 = (stat_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stat_variance_get" "', argument " "1"" of type '" "stat_t *""'"); + } + arg1 = reinterpret_cast< stat_t * >(argp1); + result = (double) ((arg1)->variance); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_stat(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + double arg1 = (double) 0 ; + double arg2 = (double) 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"mean_in", (char *)"variance_in", NULL + }; + stat_t *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_stat", kwnames, &obj0, &obj1)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_stat" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_stat" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + } + result = (stat_t *)new stat_t(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_stat___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + stat_t *arg1 = (stat_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stat___str__" "', argument " "1"" of type '" "stat_t *""'"); + } + arg1 = reinterpret_cast< stat_t * >(argp1); + result = (char *)stat_t___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_stat___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + stat_t *arg1 = (stat_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "stat___repr__" "', argument " "1"" of type '" "stat_t *""'"); + } + arg1 = reinterpret_cast< stat_t * >(argp1); + result = (char *)stat_t___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_stat(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + stat_t *arg1 = (stat_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_stat_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_stat" "', argument " "1"" of type '" "stat_t *""'"); + } + arg1 = reinterpret_cast< stat_t * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *stat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_stat_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *stat_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_haploid_lowd(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 1 ; + int arg2 = (int) 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"L", (char *)"rng_seed", NULL + }; + haploid_lowd *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_haploid_lowd", kwnames, &obj0, &obj1)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_haploid_lowd" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_haploid_lowd" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + try { + result = (haploid_lowd *)new haploid_lowd(arg1,arg2); + } catch (int err) { + PyErr_SetString(PyExc_ValueError,"Construction impossible. Please check input args."); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_haploid_lowd, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_haploid_lowd(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_haploid_lowd" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_carrying_capacity_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_lowd_carrying_capacity_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_carrying_capacity_set" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_carrying_capacity_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->carrying_capacity = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_carrying_capacity_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_carrying_capacity_get" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (double) ((arg1)->carrying_capacity); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_outcrossing_rate_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_lowd_outcrossing_rate_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_outcrossing_rate_set" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_outcrossing_rate_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->outcrossing_rate = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_outcrossing_rate_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_outcrossing_rate_get" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (double) ((arg1)->outcrossing_rate); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_circular_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_lowd_circular_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_circular_set" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_circular_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->circular = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_circular_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_circular_get" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (bool) ((arg1)->circular); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd__get_mutation_rate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", (char *)"direction", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_lowd__get_mutation_rate", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd__get_mutation_rate" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd__get_mutation_rate" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_lowd__get_mutation_rate" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_mutation_rate(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd__get_recombination_model(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd__get_recombination_model" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (int)(arg1)->get_recombination_model(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_recombination_rate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_get_recombination_rate", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_recombination_rate" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_recombination_rate" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_recombination_rate(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_set_allele_frequencies(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + double *arg2 = (double *) 0 ; + unsigned long arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + unsigned long val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"frequencies", (char *)"N", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_lowd_set_allele_frequencies", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_set_allele_frequencies" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (double*) array_data(array2); + } + ecode3 = SWIG_AsVal_unsigned_SS_long(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_lowd_set_allele_frequencies" "', argument " "3"" of type '" "unsigned long""'"); + } + arg3 = static_cast< unsigned long >(val3); + { + result = (int)(arg1)->set_allele_frequencies(arg2,arg3); + if (result) { + PyErr_SetString(PyExc_RuntimeError,"Error in the C++ function."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_set_wildtype(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"N", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_set_wildtype", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_set_wildtype" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_set_wildtype" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + { + result = (int)(arg1)->set_wildtype(arg2); + if (result) { + PyErr_SetString(PyExc_RuntimeError,"Error in the C++ function."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd__set_recombination_model(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"rec_model", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd__set_recombination_model", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd__set_recombination_model" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd__set_recombination_model" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + result = (int)(arg1)->set_recombination_model(arg2); + if (result == HG_BADARG) { + PyErr_SetString(PyExc_ValueError,"Recombination model nor recognized."); + SWIG_fail; + } else if (result == HG_MEMERR) { + PyErr_SetString(PyExc_ValueError,"Unable to allocate/release memory for the recombination patterns."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd__set_recombination_rates(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + double *arg2 = (double *) 0 ; + int arg3 = (int) -1 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"rec_rates", (char *)"rec_model", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:haploid_lowd__set_recombination_rates", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd__set_recombination_rates" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + { + /* Ensure input is a Python sequence */ + PyObject *tmplist = PySequence_Fast(obj1, "I expected a sequence"); + unsigned long L = PySequence_Length(tmplist); + + /* Get circular and L properties from the class (we are in the Python world here) */ + bool circular = (bool)PyInt_AsLong(PyObject_GetAttrString(obj0, "circular")); + unsigned long Lint = PyInt_AsLong(PyObject_GetAttrString(obj0, "L")); + + /* Check lengths */ + if((!(circular)) && (L != Lint - 1)) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of length L-1."); + SWIG_fail; + } + if((circular) && (L != Lint)) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of length L."); + SWIG_fail; + } + + /* Create C array from Python list */ + arg2 = new double[L]; + double tmpdouble; + for(size_t i=0; i < L; i++) { + tmpdouble = (double)PyFloat_AsDouble(PySequence_Fast_GET_ITEM(tmplist, i)); + if (tmpdouble < 0) { + PyErr_SetString(PyExc_ValueError,"Expecting a sequence of positive floats"); + SWIG_fail; + } + arg2[i] = tmpdouble; + } + } + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_lowd__set_recombination_rates" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + result = (int)(arg1)->set_recombination_rates(arg2,arg3); + resultobj = SWIG_From_int(static_cast< int >(result)); + { + if(arg2) delete[] arg2; + } + return resultobj; +fail: + { + if(arg2) delete[] arg2; + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_evolve(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 = (int) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"gen", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:haploid_lowd_evolve", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_evolve" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_evolve" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + result = (int)(arg1)->evolve(arg2); + if (result) { + PyErr_SetString(PyExc_RuntimeError,"Error in the C++ function."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_evolve_norec(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 = (int) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"gen", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:haploid_lowd_evolve_norec", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_evolve_norec" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_evolve_norec" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + result = (int)(arg1)->evolve_norec(arg2); + if (result) { + PyErr_SetString(PyExc_RuntimeError,"Error in the C++ function."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_evolve_deterministic(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 = (int) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"gen", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:haploid_lowd_evolve_deterministic", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_evolve_deterministic" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_evolve_deterministic" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + result = (int)(arg1)->evolve_deterministic(arg2); + if (result) { + PyErr_SetString(PyExc_RuntimeError,"Error in the C++ function."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_genotype_frequency(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"genotype", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_get_genotype_frequency", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_genotype_frequency" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_genotype_frequency" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_genotype_frequency(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_allele_frequency(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_get_allele_frequency", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_allele_frequency" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_allele_frequency" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_allele_frequency(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_pair_frequency(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus1", (char *)"locus2", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_lowd_get_pair_frequency", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_pair_frequency" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_pair_frequency" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_lowd_get_pair_frequency" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_pair_frequency(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_chi(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_get_chi", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_chi" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_chi" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_chi(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_chi2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus1", (char *)"locus2", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_lowd_get_chi2", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_chi2" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_chi2" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_lowd_get_chi2" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_chi2(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_LD(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus1", (char *)"locus2", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_lowd_get_LD", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_LD" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_LD" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_lowd_get_LD" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_LD(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_moment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus1", (char *)"locus2", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_lowd_get_moment", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_moment" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_moment" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_lowd_get_moment" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_moment(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_genotype_entropy(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_genotype_entropy" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (double)(arg1)->genotype_entropy(); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_allele_entropy(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_allele_entropy" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (double)(arg1)->allele_entropy(); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_fitness(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"genotype", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_get_fitness", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_fitness" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_fitness" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_fitness(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_fitness_coefficient(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"bitset_loci", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_get_fitness_coefficient", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_fitness_coefficient" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_get_fitness_coefficient" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_fitness_coefficient(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_fitness_statistics(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + stat_t result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_fitness_statistics" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (arg1)->get_fitness_statistics(); + resultobj = SWIG_NewPointerObj((new stat_t(result)), SWIGTYPE_p_stat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd___str__" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (char *)haploid_lowd___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd___repr__" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (char *)haploid_lowd___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_L_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_L_get" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (int)haploid_lowd_L_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_number_of_loci_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_number_of_loci_get" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (int)haploid_lowd_number_of_loci_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_N_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_N_get" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (int)haploid_lowd_N_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_population_size_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_population_size_get" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (int)haploid_lowd_population_size_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_generation_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_lowd_generation_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_generation_set" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_lowd_generation_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + haploid_lowd_generation_set(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_generation_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_generation_get" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + result = (int)haploid_lowd_generation_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd__set_genotypes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + int arg4 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + PyArrayObject *array4 = NULL ; + int is_new_object4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"len1", (char *)"len2", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_lowd__set_genotypes", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd__set_genotypes" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, + NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (int) array_size(array2,0); + arg3 = (double*) array_data(array2); + } + { + npy_intp size[1] = { + -1 + }; + array4 = obj_to_array_contiguous_allow_conversion(obj2, + NPY_DOUBLE, + &is_new_object4); + if (!array4 || !require_dimensions(array4, 1) || + !require_size(array4, size, 1)) SWIG_fail; + arg4 = (int) array_size(array4,0); + arg5 = (double*) array_data(array4); + } + result = (int)haploid_lowd__set_genotypes(arg1,arg2,arg3,arg4,arg5); + resultobj = SWIG_From_int(static_cast< int >(result)); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd__set_mutation_rates(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + double *arg2 = (double *) 0 ; + int arg3 ; + int arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"IN_ARRAY2", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd__set_mutation_rates", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd__set_mutation_rates" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + { + npy_intp size[2] = { + -1, -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 2) || + !require_size(array2, size, 2)) SWIG_fail; + arg2 = (double*) array_data(array2); + arg3 = (int) array_size(array2,0); + arg4 = (int) array_size(array2,1); + } + result = (int)haploid_lowd__set_mutation_rates(arg1,arg2,arg3,arg4); + resultobj = SWIG_From_int(static_cast< int >(result)); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_fitnesses(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *array2 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"DIM1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_get_fitnesses", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_fitnesses" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + { + npy_intp dims[1]; + if (!PyLong_Check(obj1)) + { + const char* typestring = pytype_string(obj1); + PyErr_Format(PyExc_TypeError, + "Int dimension expected. '%s' given.", + typestring); + SWIG_fail; + } + arg2 = (int) PyLong_AsSsize_t(obj1); + if (arg2 == -1 && PyErr_Occurred()) SWIG_fail; + dims[0] = (npy_intp) arg2; + array2 = PyArray_SimpleNew(1, dims, NPY_DOUBLE); + if (!array2) SWIG_fail; + arg3 = (double*) array_data(array2); + } + haploid_lowd_get_fitnesses(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + resultobj = SWIG_Python_AppendOutput(resultobj, (PyObject*)array2, 1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_get_fitness_coefficients(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *array2 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"DIM1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_get_fitness_coefficients", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_get_fitness_coefficients" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + { + npy_intp dims[1]; + if (!PyLong_Check(obj1)) + { + const char* typestring = pytype_string(obj1); + PyErr_Format(PyExc_TypeError, + "Int dimension expected. '%s' given.", + typestring); + SWIG_fail; + } + arg2 = (int) PyLong_AsSsize_t(obj1); + if (arg2 == -1 && PyErr_Occurred()) SWIG_fail; + dims[0] = (npy_intp) arg2; + array2 = PyArray_SimpleNew(1, dims, NPY_DOUBLE); + if (!array2) SWIG_fail; + arg3 = (double*) array_data(array2); + } + haploid_lowd_get_fitness_coefficients(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + resultobj = SWIG_Python_AppendOutput(resultobj, (PyObject*)array2, 1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd__set_fitness_func(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + int arg4 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + PyArrayObject *array4 = NULL ; + int is_new_object4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"len1", (char *)"len2", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_lowd__set_fitness_func", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd__set_fitness_func" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, + NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (int) array_size(array2,0); + arg3 = (double*) array_data(array2); + } + { + npy_intp size[1] = { + -1 + }; + array4 = obj_to_array_contiguous_allow_conversion(obj2, + NPY_DOUBLE, + &is_new_object4); + if (!array4 || !require_dimensions(array4, 1) || + !require_size(array4, size, 1)) SWIG_fail; + arg4 = (int) array_size(array4,0); + arg5 = (double*) array_data(array4); + } + result = (int)haploid_lowd__set_fitness_func(arg1,arg2,arg3,arg4,arg5); + resultobj = SWIG_From_int(static_cast< int >(result)); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd__set_fitness_coeff(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + int arg4 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + PyArrayObject *array4 = NULL ; + int is_new_object4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"len1", (char *)"len2", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_lowd__set_fitness_coeff", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd__set_fitness_coeff" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, + NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (int) array_size(array2,0); + arg3 = (double*) array_data(array2); + } + { + npy_intp size[1] = { + -1 + }; + array4 = obj_to_array_contiguous_allow_conversion(obj2, + NPY_DOUBLE, + &is_new_object4); + if (!array4 || !require_dimensions(array4, 1) || + !require_size(array4, size, 1)) SWIG_fail; + arg4 = (int) array_size(array4,0); + arg5 = (double*) array_data(array4); + } + result = (int)haploid_lowd__set_fitness_coeff(arg1,arg2,arg3,arg4,arg5); + resultobj = SWIG_From_int(static_cast< int >(result)); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_lowd_set_fitness_additive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_lowd *arg1 = (haploid_lowd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"DIM1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_lowd_set_fitness_additive", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_lowd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_lowd_set_fitness_additive" "', argument " "1"" of type '" "haploid_lowd *""'"); + } + arg1 = reinterpret_cast< haploid_lowd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, + NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (int) array_size(array2,0); + arg3 = (double*) array_data(array2); + } + { + haploid_lowd_set_fitness_additive(arg1,arg2,arg3); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return NULL; +} + + +SWIGINTERN PyObject *haploid_lowd_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_haploid_lowd, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *haploid_lowd_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_clone_genotype_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + boost::dynamic_bitset< > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + boost::dynamic_bitset< > temp2 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "clone_genotype_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone_genotype_set" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + { + /* Ensure input is a Python sequence */ + PyObject *tmplist = PySequence_Fast(swig_obj[1], "I expected a sequence"); + unsigned long L = PySequence_Length(tmplist); + + /* Create boost::dynamic_bitset from Python list */ + temp2.resize(L); + long tmplong; + for(size_t i=0; i < L; i++) { + tmplong = PyInt_AsLong(PySequence_Fast_GET_ITEM(tmplist, i)); + if(tmplong < 0) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of bool."); + SWIG_fail; + } + temp2[i] = (bool)tmplong; + } + arg2 = temp2; + } + if (arg1) (arg1)->genotype = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_clone_genotype_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + boost::dynamic_bitset< > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone_genotype_get" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + result = ((arg1)->genotype); + { + unsigned long L = (&result)->size(); + npy_intp dims[1] = { + (npy_intp) L + }; + auto *array = reinterpret_cast(PyArray_ZEROS(1, dims, NPY_BOOL, 0)); + if (!array) SWIG_fail; + + /* no checks on memory alignments, since we create a new array */ + bool *ptr = (bool *)PyArray_DATA(array); + for(int i=0; i < L; i++, ptr++) + if((&result)->test(i)) + *ptr = true; + resultobj = reinterpret_cast(array); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_clone_fitness_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "clone_fitness_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone_fitness_set" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "clone_fitness_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->fitness = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_clone_fitness_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone_fitness_get" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + result = (double) ((arg1)->fitness); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_clone_clone_size_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "clone_clone_size_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone_clone_size_set" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "clone_clone_size_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->clone_size = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_clone_clone_size_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone_clone_size_get" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + result = (int) ((arg1)->clone_size); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_clone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + char * kwnames[] = { + (char *)"n_traits", NULL + }; + clone_t *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_clone", kwnames, &obj0)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_clone" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + result = (clone_t *)new clone_t(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_clone_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_clone___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + clone_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:clone___eq__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone___eq__" "', argument " "1"" of type '" "clone_t const *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_clone_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "clone___eq__" "', argument " "2"" of type '" "clone_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "clone___eq__" "', argument " "2"" of type '" "clone_t const &""'"); + } + arg2 = reinterpret_cast< clone_t * >(argp2); + result = (bool)((clone_t const *)arg1)->operator ==((clone_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_clone___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + clone_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:clone___ne__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone___ne__" "', argument " "1"" of type '" "clone_t const *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_clone_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "clone___ne__" "', argument " "2"" of type '" "clone_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "clone___ne__" "', argument " "2"" of type '" "clone_t const &""'"); + } + arg2 = reinterpret_cast< clone_t * >(argp2); + result = (bool)((clone_t const *)arg1)->operator !=((clone_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_clone___lt__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + clone_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:clone___lt__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone___lt__" "', argument " "1"" of type '" "clone_t const *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_clone_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "clone___lt__" "', argument " "2"" of type '" "clone_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "clone___lt__" "', argument " "2"" of type '" "clone_t const &""'"); + } + arg2 = reinterpret_cast< clone_t * >(argp2); + result = (bool)((clone_t const *)arg1)->operator <((clone_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_clone___gt__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + clone_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:clone___gt__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone___gt__" "', argument " "1"" of type '" "clone_t const *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_clone_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "clone___gt__" "', argument " "2"" of type '" "clone_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "clone___gt__" "', argument " "2"" of type '" "clone_t const &""'"); + } + arg2 = reinterpret_cast< clone_t * >(argp2); + result = (bool)((clone_t const *)arg1)->operator >((clone_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_clone___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone___str__" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + result = (char *)clone_t___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_clone___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone___repr__" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + result = (char *)clone_t___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_clone_number_of_traits_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone_number_of_traits_get" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + result = (int)clone_t_number_of_traits_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_clone__get_trait(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *array2 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"DIM1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:clone__get_trait", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_clone_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone__get_trait" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + { + npy_intp dims[1]; + if (!PyLong_Check(obj1)) + { + const char* typestring = pytype_string(obj1); + PyErr_Format(PyExc_TypeError, + "Int dimension expected. '%s' given.", + typestring); + SWIG_fail; + } + arg2 = (int) PyLong_AsSsize_t(obj1); + if (arg2 == -1 && PyErr_Occurred()) SWIG_fail; + dims[0] = (npy_intp) arg2; + array2 = PyArray_SimpleNew(1, dims, NPY_DOUBLE); + if (!array2) SWIG_fail; + arg3 = (double*) array_data(array2); + } + clone_t__get_trait(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + resultobj = SWIG_Python_AppendOutput(resultobj, (PyObject*)array2, 1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_clone(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + clone_t *arg1 = (clone_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_clone_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_clone" "', argument " "1"" of type '" "clone_t *""'"); + } + arg1 = reinterpret_cast< clone_t * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *clone_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_clone_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *clone_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_tree_key_index_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_key_index_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key_index_set" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_key_index_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->index = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_key_index_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key_index_get" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + result = (int) ((arg1)->index); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_key_age_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_key_age_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key_age_set" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_key_age_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->age = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_key_age_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key_age_get" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + result = (int) ((arg1)->age); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_key___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + tree_key_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:tree_key___eq__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key___eq__" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_key___eq__" "', argument " "2"" of type '" "tree_key_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "tree_key___eq__" "', argument " "2"" of type '" "tree_key_t const &""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + result = (bool)(arg1)->operator ==((tree_key_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_tree_key___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + tree_key_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:tree_key___ne__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key___ne__" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_key___ne__" "', argument " "2"" of type '" "tree_key_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "tree_key___ne__" "', argument " "2"" of type '" "tree_key_t const &""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + result = (bool)(arg1)->operator !=((tree_key_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_tree_key___lt__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + tree_key_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:tree_key___lt__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key___lt__" "', argument " "1"" of type '" "tree_key_t const *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_key___lt__" "', argument " "2"" of type '" "tree_key_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "tree_key___lt__" "', argument " "2"" of type '" "tree_key_t const &""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + result = (bool)((tree_key_t const *)arg1)->operator <((tree_key_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_tree_key___gt__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + tree_key_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:tree_key___gt__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key___gt__" "', argument " "1"" of type '" "tree_key_t const *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_key___gt__" "', argument " "2"" of type '" "tree_key_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "tree_key___gt__" "', argument " "2"" of type '" "tree_key_t const &""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + result = (bool)((tree_key_t const *)arg1)->operator >((tree_key_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_new_tree_key(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + int arg2 = (int) 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"index", (char *)"age", NULL + }; + tree_key_t *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_tree_key", kwnames, &obj0, &obj1)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_tree_key" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_tree_key" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + result = (tree_key_t *)new tree_key_t(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_key___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key___str__" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + result = (char *)tree_key_t___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_key___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key___repr__" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + result = (char *)tree_key_t___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_key___hash__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + long result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_key___hash__" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + result = (long)tree_key_t___hash__(arg1); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_tree_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + tree_key_t *arg1 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tree_key_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_tree_key" "', argument " "1"" of type '" "tree_key_t *""'"); + } + arg1 = reinterpret_cast< tree_key_t * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *tree_key_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_tree_key_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *tree_key_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_tree_step_pos_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_step_pos_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step_pos_set" "', argument " "1"" of type '" "step_t *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_step_pos_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->pos = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_step_pos_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step_pos_get" "', argument " "1"" of type '" "step_t *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + result = (int) ((arg1)->pos); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_step_step_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_step_step_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step_step_set" "', argument " "1"" of type '" "step_t *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_step_step_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->step = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_step_step_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step_step_get" "', argument " "1"" of type '" "step_t *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + result = (int) ((arg1)->step); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_step___lt__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + step_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:tree_step___lt__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step___lt__" "', argument " "1"" of type '" "step_t const *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_step___lt__" "', argument " "2"" of type '" "step_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "tree_step___lt__" "', argument " "2"" of type '" "step_t const &""'"); + } + arg2 = reinterpret_cast< step_t * >(argp2); + result = (bool)((step_t const *)arg1)->operator <((step_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_tree_step___gt__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + step_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:tree_step___gt__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step___gt__" "', argument " "1"" of type '" "step_t const *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_step___gt__" "', argument " "2"" of type '" "step_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "tree_step___gt__" "', argument " "2"" of type '" "step_t const &""'"); + } + arg2 = reinterpret_cast< step_t * >(argp2); + result = (bool)((step_t const *)arg1)->operator >((step_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_tree_step___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + step_t *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"other", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:tree_step___eq__", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step___eq__" "', argument " "1"" of type '" "step_t const *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_step_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_step___eq__" "', argument " "2"" of type '" "step_t const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "tree_step___eq__" "', argument " "2"" of type '" "step_t const &""'"); + } + arg2 = reinterpret_cast< step_t * >(argp2); + result = (bool)((step_t const *)arg1)->operator ==((step_t const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_TypeError)) { + return NULL; + } + PyErr_Clear(); + SWIG_Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_new_tree_step(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + int arg2 = (int) 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"pos", (char *)"step", NULL + }; + step_t *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_tree_step", kwnames, &obj0, &obj1)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_tree_step" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_tree_step" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + result = (step_t *)new step_t(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_step_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_step___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step___str__" "', argument " "1"" of type '" "step_t *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + result = (char *)step_t___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_step___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step___repr__" "', argument " "1"" of type '" "step_t *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + result = (char *)step_t___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_step___hash__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + long result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_step_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_step___hash__" "', argument " "1"" of type '" "step_t *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + result = (long)step_t___hash__(arg1); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_tree_step(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + step_t *arg1 = (step_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_step_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_tree_step" "', argument " "1"" of type '" "step_t *""'"); + } + arg1 = reinterpret_cast< step_t * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *tree_step_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_step_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *tree_step_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_tree_node_parent_node_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + tree_key_t *arg2 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_node_parent_node_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_parent_node_set" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_node_parent_node_set" "', argument " "2"" of type '" "tree_key_t *""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + if (arg1) (arg1)->parent_node = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_parent_node_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + tree_key_t *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_parent_node_get" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (tree_key_t *)& ((arg1)->parent_node); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_own_key_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + tree_key_t *arg2 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_node_own_key_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_own_key_set" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_node_own_key_set" "', argument " "2"" of type '" "tree_key_t *""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + if (arg1) (arg1)->own_key = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_own_key_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + tree_key_t *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_own_key_get" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (tree_key_t *)& ((arg1)->own_key); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node__child_edges_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + list< tree_key_t > *arg2 = (list< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_node__child_edges_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node__child_edges_set" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_node__child_edges_set" "', argument " "2"" of type '" "list< tree_key_t > *""'"); + } + arg2 = reinterpret_cast< list< tree_key_t > * >(argp2); + if (arg1) (arg1)->child_edges = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node__child_edges_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + list< tree_key_t > *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node__child_edges_get" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (list< tree_key_t > *)& ((arg1)->child_edges); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_tree_key_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_fitness_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_node_fitness_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_fitness_set" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_node_fitness_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->fitness = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_fitness_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_fitness_get" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (double) ((arg1)->fitness); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node__weight_distribution_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + vector< step_t > *arg2 = (vector< step_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_node__weight_distribution_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node__weight_distribution_set" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_node__weight_distribution_set" "', argument " "2"" of type '" "vector< step_t > *""'"); + } + arg2 = reinterpret_cast< vector< step_t > * >(argp2); + if (arg1) (arg1)->weight_distribution = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node__weight_distribution_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + vector< step_t > *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node__weight_distribution_get" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (vector< step_t > *)& ((arg1)->weight_distribution); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_step_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_number_of_offspring_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_node_number_of_offspring_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_number_of_offspring_set" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_node_number_of_offspring_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->number_of_offspring = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_number_of_offspring_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_number_of_offspring_get" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (int) ((arg1)->number_of_offspring); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_clone_size_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_node_clone_size_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_clone_size_set" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_node_clone_size_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->clone_size = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_clone_size_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_clone_size_get" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (int) ((arg1)->clone_size); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_sampled_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_node_sampled_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_sampled_set" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_node_sampled_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->sampled = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_sampled_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_sampled_get" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (int) ((arg1)->sampled); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_sequence_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + boost::dynamic_bitset< > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + boost::dynamic_bitset< > temp2 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_node_sequence_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_sequence_set" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + { + /* Ensure input is a Python sequence */ + PyObject *tmplist = PySequence_Fast(swig_obj[1], "I expected a sequence"); + unsigned long L = PySequence_Length(tmplist); + + /* Create boost::dynamic_bitset from Python list */ + temp2.resize(L); + long tmplong; + for(size_t i=0; i < L; i++) { + tmplong = PyInt_AsLong(PySequence_Fast_GET_ITEM(tmplist, i)); + if(tmplong < 0) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of bool."); + SWIG_fail; + } + temp2[i] = (bool)tmplong; + } + arg2 = temp2; + } + if (arg1) (arg1)->sequence = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node_sequence_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + boost::dynamic_bitset< > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node_sequence_get" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = ((arg1)->sequence); + { + unsigned long L = (&result)->size(); + npy_intp dims[1] = { + (npy_intp) L + }; + auto *array = reinterpret_cast(PyArray_ZEROS(1, dims, NPY_BOOL, 0)); + if (!array) SWIG_fail; + + /* no checks on memory alignments, since we create a new array */ + bool *ptr = (bool *)PyArray_DATA(array); + for(int i=0; i < L; i++, ptr++) + if((&result)->test(i)) + *ptr = true; + resultobj = reinterpret_cast(array); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node___str__" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (char *)node_t___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node___repr__" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + result = (char *)node_t___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node__get_crossover_chunk(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:tree_node__get_crossover_chunk", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node__get_crossover_chunk" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_node__get_crossover_chunk" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (int)node_t__get_crossover_chunk(arg1,arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_node__set_crossover_chunk(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"value", (char *)"i", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:tree_node__set_crossover_chunk", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_node_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_node__set_crossover_chunk" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_node__set_crossover_chunk" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tree_node__set_crossover_chunk" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + node_t__set_crossover_chunk(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_tree_node(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *result = 0 ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "new_tree_node", 0, 0, 0)) SWIG_fail; + result = (node_t *)new node_t(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_node_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_tree_node(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + node_t *arg1 = (node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_node_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_tree_node" "', argument " "1"" of type '" "node_t *""'"); + } + arg1 = reinterpret_cast< node_t * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *tree_node_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_node_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *tree_node_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_tree_edge_parent_node_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + tree_key_t *arg2 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_edge_parent_node_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge_parent_node_set" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_edge_parent_node_set" "', argument " "2"" of type '" "tree_key_t *""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + if (arg1) (arg1)->parent_node = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge_parent_node_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + tree_key_t *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge_parent_node_get" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + result = (tree_key_t *)& ((arg1)->parent_node); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge_own_key_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + tree_key_t *arg2 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_edge_own_key_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge_own_key_set" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tree_edge_own_key_set" "', argument " "2"" of type '" "tree_key_t *""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + if (arg1) (arg1)->own_key = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge_own_key_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + tree_key_t *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge_own_key_get" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + result = (tree_key_t *)& ((arg1)->own_key); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge_length_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_edge_length_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge_length_set" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_edge_length_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->length = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge_length_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge_length_get" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + result = (int) ((arg1)->length); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge_number_of_offspring_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "tree_edge_number_of_offspring_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge_number_of_offspring_set" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_edge_number_of_offspring_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->number_of_offspring = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge_number_of_offspring_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge_number_of_offspring_get" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + result = (int) ((arg1)->number_of_offspring); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge___str__" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + result = (char *)edge_t___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge___repr__" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + result = (char *)edge_t___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_tree_edge__get_segment_chunk(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"i", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:tree_edge__get_segment_chunk", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_edge_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tree_edge__get_segment_chunk" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tree_edge__get_segment_chunk" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (int)edge_t__get_segment_chunk(arg1,arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_tree_edge(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *result = 0 ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "new_tree_edge", 0, 0, 0)) SWIG_fail; + result = (edge_t *)new edge_t(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_edge_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_tree_edge(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + edge_t *arg1 = (edge_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_edge_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_tree_edge" "', argument " "1"" of type '" "edge_t *""'"); + } + arg1 = reinterpret_cast< edge_t * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *tree_edge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_edge_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *tree_edge_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_polymorphism_birth_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "polymorphism_birth_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_birth_set" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "polymorphism_birth_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->birth = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism_birth_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_birth_get" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + result = (int) ((arg1)->birth); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism_sweep_time_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "polymorphism_sweep_time_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_sweep_time_set" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "polymorphism_sweep_time_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->sweep_time = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism_sweep_time_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_sweep_time_get" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + result = (int) ((arg1)->sweep_time); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism_effect_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "polymorphism_effect_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_effect_set" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "polymorphism_effect_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->effect = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism_effect_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_effect_get" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + result = (double) ((arg1)->effect); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism_fitness_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "polymorphism_fitness_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_fitness_set" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "polymorphism_fitness_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->fitness = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism_fitness_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_fitness_get" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + result = (double) ((arg1)->fitness); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism_fitness_variance_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "polymorphism_fitness_variance_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_fitness_variance_set" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "polymorphism_fitness_variance_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->fitness_variance = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism_fitness_variance_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism_fitness_variance_get" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + result = (double) ((arg1)->fitness_variance); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_polymorphism(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + int arg2 = (int) 0 ; + double arg3 = (double) 0 ; + double arg4 = (double) 0 ; + double arg5 = (double) 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *)"b", (char *)"age", (char *)"e", (char *)"f", (char *)"fvar", NULL + }; + poly_t *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOOOO:new_polymorphism", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_polymorphism" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_polymorphism" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_polymorphism" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_polymorphism" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_polymorphism" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + } + result = (poly_t *)new poly_t(arg1,arg2,arg3,arg4,arg5); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_poly_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism___str__" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + result = (char *)poly_t___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_polymorphism___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polymorphism___repr__" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + result = (char *)poly_t___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_polymorphism(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + poly_t *arg1 = (poly_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_poly_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_polymorphism" "', argument " "1"" of type '" "poly_t *""'"); + } + arg1 = reinterpret_cast< poly_t * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *polymorphism_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_poly_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *polymorphism_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_rooted_tree__edges_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + map< tree_key_t,edge_t > *arg2 = (map< tree_key_t,edge_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "rooted_tree__edges_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree__edges_set" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree__edges_set" "', argument " "2"" of type '" "map< tree_key_t,edge_t > *""'"); + } + arg2 = reinterpret_cast< map< tree_key_t,edge_t > * >(argp2); + if (arg1) (arg1)->edges = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree__edges_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + map< tree_key_t,edge_t > *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree__edges_get" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (map< tree_key_t,edge_t > *)& ((arg1)->edges); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_tree_key_t_edge_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree__nodes_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + map< tree_key_t,node_t > *arg2 = (map< tree_key_t,node_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "rooted_tree__nodes_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree__nodes_set" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree__nodes_set" "', argument " "2"" of type '" "map< tree_key_t,node_t > *""'"); + } + arg2 = reinterpret_cast< map< tree_key_t,node_t > * >(argp2); + if (arg1) (arg1)->nodes = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree__nodes_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + map< tree_key_t,node_t > *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree__nodes_get" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (map< tree_key_t,node_t > *)& ((arg1)->nodes); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_tree_key_t_node_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree__leafs_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + vector< tree_key_t > *arg2 = (vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "rooted_tree__leafs_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree__leafs_set" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree__leafs_set" "', argument " "2"" of type '" "vector< tree_key_t > *""'"); + } + arg2 = reinterpret_cast< vector< tree_key_t > * >(argp2); + if (arg1) (arg1)->leafs = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree__leafs_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + vector< tree_key_t > *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree__leafs_get" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (vector< tree_key_t > *)& ((arg1)->leafs); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree__sampled_leafs_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + vector< tree_key_t > *arg2 = (vector< tree_key_t > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "rooted_tree__sampled_leafs_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree__sampled_leafs_set" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree__sampled_leafs_set" "', argument " "2"" of type '" "vector< tree_key_t > *""'"); + } + arg2 = reinterpret_cast< vector< tree_key_t > * >(argp2); + if (arg1) (arg1)->sampled_leafs = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree__sampled_leafs_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + vector< tree_key_t > *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree__sampled_leafs_get" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (vector< tree_key_t > *)& ((arg1)->sampled_leafs); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_tree_key_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_root_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + tree_key_t *arg2 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "rooted_tree_root_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_root_set" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree_root_set" "', argument " "2"" of type '" "tree_key_t *""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + if (arg1) (arg1)->root = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_root_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + tree_key_t *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_root_get" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (tree_key_t *)& ((arg1)->root); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_MRCA_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + tree_key_t *arg2 = (tree_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "rooted_tree_MRCA_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_MRCA_set" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tree_key_t, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree_MRCA_set" "', argument " "2"" of type '" "tree_key_t *""'"); + } + arg2 = reinterpret_cast< tree_key_t * >(argp2); + if (arg1) (arg1)->MRCA = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_MRCA_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + tree_key_t *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_MRCA_get" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (tree_key_t *)& ((arg1)->MRCA); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tree_key_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_rooted_tree(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *result = 0 ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "new_rooted_tree", 0, 0, 0)) SWIG_fail; + result = (rooted_tree *)new rooted_tree(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_rooted_tree, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_rooted_tree(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_rooted_tree" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_external_branch_length(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_external_branch_length" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (int)(arg1)->external_branch_length(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_total_branch_length(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_total_branch_length" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (int)(arg1)->total_branch_length(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_calc_weight_distribution(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + tree_key_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"subtree_root", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:rooted_tree_calc_weight_distribution", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_calc_weight_distribution" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree_calc_weight_distribution" "', argument " "2"" of type '" "tree_key_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "rooted_tree_calc_weight_distribution" "', argument " "2"" of type '" "tree_key_t""'"); + } else { + tree_key_t * temp = reinterpret_cast< tree_key_t * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + result = (int)(arg1)->calc_weight_distribution(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_print_newick(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + string result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_print_newick" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (arg1)->print_newick(); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_print_sequences(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + string result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_print_sequences" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (arg1)->print_sequences(); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_subtree_newick(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + tree_key_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"root", NULL + }; + string result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:rooted_tree_subtree_newick", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_subtree_newick" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree_subtree_newick" "', argument " "2"" of type '" "tree_key_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "rooted_tree_subtree_newick" "', argument " "2"" of type '" "tree_key_t""'"); + } else { + tree_key_t * temp = reinterpret_cast< tree_key_t * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + result = (arg1)->subtree_newick(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_print_weight_distribution(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + tree_key_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"node_key", NULL + }; + string result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:rooted_tree_print_weight_distribution", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_print_weight_distribution" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree_print_weight_distribution" "', argument " "2"" of type '" "tree_key_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "rooted_tree_print_weight_distribution" "', argument " "2"" of type '" "tree_key_t""'"); + } else { + tree_key_t * temp = reinterpret_cast< tree_key_t * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + result = (arg1)->print_weight_distribution(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_read_newick(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + string arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"newick_string", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:rooted_tree_read_newick", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_read_newick" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "rooted_tree_read_newick" "', argument " "2"" of type '" "string""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = (int)(arg1)->read_newick(SWIG_STD_MOVE(arg2)); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_get_sampled_leafs(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + vector< tree_key_t > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_get_sampled_leafs" "', argument " "1"" of type '" "rooted_tree const *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = ((rooted_tree const *)arg1)->get_sampled_leafs(); + resultobj = swig::from(static_cast< std::vector< tree_key_t,std::allocator< tree_key_t > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_set_sampled_leafs(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + vector< tree_key_t > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"leafs", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:rooted_tree_set_sampled_leafs", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_set_sampled_leafs" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + { + std::vector< tree_key_t,std::allocator< tree_key_t > > *ptr = (std::vector< tree_key_t,std::allocator< tree_key_t > > *)0; + res2 = swig::asptr(obj1, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rooted_tree_set_sampled_leafs" "', argument " "2"" of type '" "vector< tree_key_t > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "rooted_tree_set_sampled_leafs" "', argument " "2"" of type '" "vector< tree_key_t > const &""'"); + } + arg2 = ptr; + } + (arg1)->set_sampled_leafs((vector< tree_key_t > const &)*arg2); + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree___str__" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (char *)rooted_tree___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree___repr__" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + result = (char *)rooted_tree___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree__ancestors_at_age(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + int arg2 ; + tree_key_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"age", (char *)"subtree_root", NULL + }; + vector< tree_key_t > result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:rooted_tree__ancestors_at_age", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree__ancestors_at_age" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rooted_tree__ancestors_at_age" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_tree_key_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rooted_tree__ancestors_at_age" "', argument " "3"" of type '" "tree_key_t""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "rooted_tree__ancestors_at_age" "', argument " "3"" of type '" "tree_key_t""'"); + } else { + tree_key_t * temp = reinterpret_cast< tree_key_t * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + result = rooted_tree__ancestors_at_age(arg1,arg2,SWIG_STD_MOVE(arg3)); + resultobj = swig::from(static_cast< std::vector< tree_key_t,std::allocator< tree_key_t > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_rooted_tree_create_subtree_from_keys(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + rooted_tree *arg1 = (rooted_tree *) 0 ; + vector< tree_key_t > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"leaves", NULL + }; + rooted_tree result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:rooted_tree_create_subtree_from_keys", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_rooted_tree, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rooted_tree_create_subtree_from_keys" "', argument " "1"" of type '" "rooted_tree *""'"); + } + arg1 = reinterpret_cast< rooted_tree * >(argp1); + { + std::vector< tree_key_t,std::allocator< tree_key_t > > *ptr = (std::vector< tree_key_t,std::allocator< tree_key_t > > *)0; + int res = swig::asptr(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "rooted_tree_create_subtree_from_keys" "', argument " "2"" of type '" "vector< tree_key_t >""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + result = rooted_tree_create_subtree_from_keys(arg1,SWIG_STD_MOVE(arg2)); + resultobj = SWIG_NewPointerObj((new rooted_tree(result)), SWIGTYPE_p_rooted_tree, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *rooted_tree_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_rooted_tree, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *rooted_tree_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_multi_locus_genealogy(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + multi_locus_genealogy *result = 0 ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "new_multi_locus_genealogy", 0, 0, 0)) SWIG_fail; + result = (multi_locus_genealogy *)new multi_locus_genealogy(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_multi_locus_genealogy, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_multi_locus_genealogy(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_multi_locus_genealogy, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_multi_locus_genealogy" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy_track_locus(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"new_locus", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:multi_locus_genealogy_track_locus", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy_track_locus" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "multi_locus_genealogy_track_locus" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + (arg1)->track_locus(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy_reset(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy_reset" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + (arg1)->reset(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy_reset_but_loci(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy_reset_but_loci" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + (arg1)->reset_but_loci(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy___str__" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + result = (char *)multi_locus_genealogy___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy___repr__" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + result = (char *)multi_locus_genealogy___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy__get_number_of_loci(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy__get_number_of_loci" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + result = (int)multi_locus_genealogy__get_number_of_loci(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy__get_loci(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + int arg2 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *array2 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"DIM1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:multi_locus_genealogy__get_loci", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy__get_loci" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + { + npy_intp dims[1]; + if (!PyLong_Check(obj1)) + { + const char* typestring = pytype_string(obj1); + PyErr_Format(PyExc_TypeError, + "Int dimension expected. '%s' given.", + typestring); + SWIG_fail; + } + arg2 = (int) PyLong_AsSsize_t(obj1); + if (arg2 == -1 && PyErr_Occurred()) SWIG_fail; + dims[0] = (npy_intp) arg2; + array2 = PyArray_SimpleNew(1, dims, NPY_INT); + if (!array2) SWIG_fail; + arg3 = (int*) array_data(array2); + } + multi_locus_genealogy__get_loci(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + resultobj = SWIG_Python_AppendOutput(resultobj, (PyObject*)array2, 1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy_get_tree(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", NULL + }; + rooted_tree result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:multi_locus_genealogy_get_tree", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy_get_tree" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "multi_locus_genealogy_get_tree" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = multi_locus_genealogy_get_tree(arg1,arg2); + } catch (int err) { + PyErr_SetString(PyExc_ValueError,"Locus not found among the tracked ones."); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj((new rooted_tree(result)), SWIGTYPE_p_rooted_tree, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy__set_tree(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + int arg2 ; + rooted_tree *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", (char *)"tree", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:multi_locus_genealogy__set_tree", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy__set_tree" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "multi_locus_genealogy__set_tree" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_rooted_tree, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "multi_locus_genealogy__set_tree" "', argument " "3"" of type '" "rooted_tree &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "multi_locus_genealogy__set_tree" "', argument " "3"" of type '" "rooted_tree &""'"); + } + arg3 = reinterpret_cast< rooted_tree * >(argp3); + { + try { + multi_locus_genealogy__set_tree(arg1,arg2,*arg3); + } catch (int err) { + PyErr_SetString(PyExc_ValueError,"Locus not found among the tracked ones."); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy__get_newGeneration(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", NULL + }; + vector< node_t > result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:multi_locus_genealogy__get_newGeneration", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy__get_newGeneration" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "multi_locus_genealogy__get_newGeneration" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = multi_locus_genealogy__get_newGeneration(arg1,arg2); + } catch (int err) { + PyErr_SetString(PyExc_ValueError,"Locus not found among the tracked ones."); + SWIG_fail; + } + } + resultobj = swig::from(static_cast< std::vector< node_t,std::allocator< node_t > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_multi_locus_genealogy__set_newGeneration(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + multi_locus_genealogy *arg1 = (multi_locus_genealogy *) 0 ; + int arg2 ; + vector< node_t > arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", (char *)"newGeneration", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:multi_locus_genealogy__set_newGeneration", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_multi_locus_genealogy, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multi_locus_genealogy__set_newGeneration" "', argument " "1"" of type '" "multi_locus_genealogy *""'"); + } + arg1 = reinterpret_cast< multi_locus_genealogy * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "multi_locus_genealogy__set_newGeneration" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + std::vector< node_t,std::allocator< node_t > > *ptr = (std::vector< node_t,std::allocator< node_t > > *)0; + int res = swig::asptr(obj2, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "multi_locus_genealogy__set_newGeneration" "', argument " "3"" of type '" "vector< node_t >""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + multi_locus_genealogy__set_newGeneration(arg1,arg2,SWIG_STD_MOVE(arg3)); + } catch (int err) { + PyErr_SetString(PyExc_ValueError,"Locus not found among the tracked ones."); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *multi_locus_genealogy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_multi_locus_genealogy, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *multi_locus_genealogy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_haploid_highd(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + int arg2 = (int) 0 ; + int arg3 = (int) 1 ; + bool arg4 = (bool) false ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *)"L", (char *)"rng_seed", (char *)"number_of_traits", (char *)"all_polymorphic", NULL + }; + haploid_highd *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOOO:new_haploid_highd", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_haploid_highd" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_haploid_highd" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_haploid_highd" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_haploid_highd" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + } + { + try { + result = (haploid_highd *)new haploid_highd(arg1,arg2,arg3,arg4); + } catch (int err) { + PyErr_SetString(PyExc_ValueError, + "Construction impossible. Please check input args."); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_haploid_highd, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_haploid_highd(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_haploid_highd" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_carrying_capacity_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_highd_carrying_capacity_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_carrying_capacity_set" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_carrying_capacity_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->carrying_capacity = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_carrying_capacity_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_carrying_capacity_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int) ((arg1)->carrying_capacity); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_outcrossing_rate_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_highd_outcrossing_rate_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_outcrossing_rate_set" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_outcrossing_rate_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->outcrossing_rate = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_outcrossing_rate_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_outcrossing_rate_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (double) ((arg1)->outcrossing_rate); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_crossover_rate_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_highd_crossover_rate_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_crossover_rate_set" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_crossover_rate_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->crossover_rate = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_crossover_rate_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_crossover_rate_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (double) ((arg1)->crossover_rate); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_recombination_model_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_highd_recombination_model_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_recombination_model_set" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_recombination_model_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->recombination_model = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_recombination_model_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_recombination_model_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int) ((arg1)->recombination_model); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_circular_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_highd_circular_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_circular_set" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_circular_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->circular = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_circular_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_circular_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (bool) ((arg1)->circular); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_growth_rate_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_highd_growth_rate_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_growth_rate_set" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_growth_rate_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (arg1) (arg1)->growth_rate = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_growth_rate_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_growth_rate_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (double) ((arg1)->growth_rate); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_all_polymorphic_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_highd_all_polymorphic_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_all_polymorphic_set" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_all_polymorphic_set" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + if (arg1) (arg1)->all_polymorphic = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_all_polymorphic_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_all_polymorphic_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (bool) ((arg1)->all_polymorphic); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__get_mutation_rate(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__get_mutation_rate" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (double)(arg1)->get_mutation_rate(); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__set_mutation_rate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"m", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd__set_mutation_rate", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__set_mutation_rate" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd__set_mutation_rate" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (arg1)->set_mutation_rate(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_all_polymorphic(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_all_polymorphic" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (bool)(arg1)->get_all_polymorphic(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_set_all_polymorphic(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"ap", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_set_all_polymorphic", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_set_all_polymorphic" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_set_all_polymorphic" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + (arg1)->set_all_polymorphic(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__get_polymorphisms(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + vector< poly_t > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__get_polymorphisms" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (arg1)->get_polymorphisms(); + resultobj = swig::from(static_cast< std::vector< poly_t,std::allocator< poly_t > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__get_fixed_mutations(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + vector< poly_t > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__get_fixed_mutations" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (arg1)->get_fixed_mutations(); + resultobj = swig::from(static_cast< std::vector< poly_t,std::allocator< poly_t > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__get_number_of_mutations(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + vector< int > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__get_number_of_mutations" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (arg1)->get_number_of_mutations(); + resultobj = swig::from(static_cast< std::vector< int,std::allocator< int > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_set_allele_frequencies(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double *arg2 = (double *) 0 ; + unsigned long arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + unsigned long val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"frequencies", (char *)"N", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd_set_allele_frequencies", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_set_allele_frequencies" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (double*) array_data(array2); + } + ecode3 = SWIG_AsVal_unsigned_SS_long(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_highd_set_allele_frequencies" "', argument " "3"" of type '" "unsigned long""'"); + } + arg3 = static_cast< unsigned long >(val3); + { + result = (int)(arg1)->set_allele_frequencies(arg2,arg3); + if (result) { + PyErr_SetString(PyExc_RuntimeError,"Error in the C++ function."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_set_wildtype(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"N", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_set_wildtype", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_set_wildtype" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_set_wildtype" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + result = (int)(arg1)->set_wildtype(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_track_locus_genealogy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + vector< int > arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector< int > temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"loci", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_track_locus_genealogy", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_track_locus_genealogy" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + /* Ensure input is a Python sequence */ + PyObject *tmplist = PySequence_Fast(obj1, "I expected a sequence"); + unsigned long L = PySequence_Length(tmplist); + + /* Create std::vector from Python list */ + temp2.reserve(L); + long tmplong; + for(size_t i=0; i < L; i++) { + tmplong = PyInt_AsLong(PySequence_Fast_GET_ITEM(tmplist, i)); + if(tmplong < 0) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of positive integers (the loci)."); + SWIG_fail; + } + temp2.push_back((int)tmplong); + } + arg2 = temp2; + } + { + result = (int)(arg1)->track_locus_genealogy(SWIG_STD_MOVE(arg2)); + if (result) { + PyErr_SetString(PyExc_ValueError,"Track the genealogy before initializing the population."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_add_genotype(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + boost::dynamic_bitset< > arg2 ; + int arg3 = (int) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + boost::dynamic_bitset< > temp2 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"genotype", (char *)"n", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:haploid_highd_add_genotype", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_add_genotype" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + /* Ensure input is a Python sequence */ + PyObject *tmplist = PySequence_Fast(obj1, "I expected a sequence"); + unsigned long L = PySequence_Length(tmplist); + + /* Create boost::dynamic_bitset from Python list */ + temp2.resize(L); + long tmplong; + for(size_t i=0; i < L; i++) { + tmplong = PyInt_AsLong(PySequence_Fast_GET_ITEM(tmplist, i)); + if(tmplong < 0) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of bool."); + SWIG_fail; + } + temp2[i] = (bool)tmplong; + } + arg2 = temp2; + } + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_highd_add_genotype" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + (arg1)->add_genotype(SWIG_STD_MOVE(arg2),arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_add_trait_coefficient(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double arg2 ; + vector< int > arg3 ; + int arg4 = (int) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + std::vector< int > temp3 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"value", (char *)"loci", (char *)"t", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:haploid_highd_add_trait_coefficient", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_add_trait_coefficient" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_add_trait_coefficient" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + /* Ensure input is a Python sequence */ + PyObject *tmplist = PySequence_Fast(obj2, "I expected a sequence"); + unsigned long L = PySequence_Length(tmplist); + + /* Create std::vector from Python list */ + temp3.reserve(L); + long tmplong; + for(size_t i=0; i < L; i++) { + tmplong = PyInt_AsLong(PySequence_Fast_GET_ITEM(tmplist, i)); + if(tmplong < 0) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of positive integers (the loci)."); + SWIG_fail; + } + temp3.push_back((int)tmplong); + } + arg3 = temp3; + } + if (obj3) { + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "haploid_highd_add_trait_coefficient" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } + result = (int)(arg1)->add_trait_coefficient(arg2,SWIG_STD_MOVE(arg3),arg4); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_clear_trait(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 = (int) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"t", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:haploid_highd_clear_trait", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_clear_trait" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_clear_trait" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + (arg1)->clear_trait(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_clear_traits(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_clear_traits" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + (arg1)->clear_traits(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_set_random_trait_epistasis(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double arg2 ; + int arg3 = (int) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"epistasis_std", (char *)"traitnumber", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:haploid_highd_set_random_trait_epistasis", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_set_random_trait_epistasis" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_set_random_trait_epistasis" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_highd_set_random_trait_epistasis" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + (arg1)->set_random_trait_epistasis(arg2,arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_add_fitness_coefficient(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double arg2 ; + vector< int > arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + std::vector< int > temp3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"value", (char *)"loci", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd_add_fitness_coefficient", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_add_fitness_coefficient" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_add_fitness_coefficient" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + /* Ensure input is a Python sequence */ + PyObject *tmplist = PySequence_Fast(obj2, "I expected a sequence"); + unsigned long L = PySequence_Length(tmplist); + + /* Create std::vector from Python list */ + temp3.reserve(L); + long tmplong; + for(size_t i=0; i < L; i++) { + tmplong = PyInt_AsLong(PySequence_Fast_GET_ITEM(tmplist, i)); + if(tmplong < 0) { + PyErr_SetString(PyExc_ValueError, "Expecting an array of positive integers (the loci)."); + SWIG_fail; + } + temp3.push_back((int)tmplong); + } + arg3 = temp3; + } + result = (int)(arg1)->add_fitness_coefficient(arg2,SWIG_STD_MOVE(arg3)); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_clear_fitness(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_clear_fitness" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + try { + (arg1)->clear_fitness(); + } catch (int err) { + PyErr_SetString(PyExc_ValueError,"Fitness depends only on traits, not on the genome directly."); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_set_random_epistasis(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"epistasis_std", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_set_random_epistasis", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_set_random_epistasis" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_set_random_epistasis" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + (arg1)->set_random_epistasis(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_evolve(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 = (int) 1 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"gen", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:haploid_highd_evolve", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_evolve" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_evolve" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + { + result = (int)(arg1)->evolve(arg2); + if (result) { + PyErr_SetString(PyExc_RuntimeError,"Error in the C++ function."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_bottleneck(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"size_of_bottleneck", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_bottleneck", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_bottleneck" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_bottleneck" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (int)(arg1)->bottleneck(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_flip_single_locus(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", NULL + }; + unsigned int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_flip_single_locus", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_flip_single_locus" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_flip_single_locus" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (unsigned int)(arg1)->flip_single_locus(arg2); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_calc_stat(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_calc_stat" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + (arg1)->calc_stat(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_unique_clones(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_unique_clones" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + (arg1)->unique_clones(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__get_nonempty_clones(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + vector< int > result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__get_nonempty_clones" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (arg1)->get_nonempty_clones(); + resultobj = swig::from(static_cast< std::vector< int,std::allocator< int > > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_random_clone(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_random_clone" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int)(arg1)->random_clone(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_diversity_statistics(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + unsigned int arg2 = (unsigned int) 1000 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n_sample", NULL + }; + stat_t result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:haploid_highd_get_diversity_statistics", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_diversity_statistics" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_diversity_statistics" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + } + result = (arg1)->get_diversity_statistics(arg2); + resultobj = SWIG_NewPointerObj((new stat_t(result)), SWIGTYPE_p_stat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_divergence_statistics(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + unsigned int arg2 = (unsigned int) 1000 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n_sample", NULL + }; + stat_t result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:haploid_highd_get_divergence_statistics", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_divergence_statistics" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_divergence_statistics" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + } + result = (arg1)->get_divergence_statistics(arg2); + resultobj = SWIG_NewPointerObj((new stat_t(result)), SWIGTYPE_p_stat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_allele_frequency(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"l", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_allele_frequency", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_allele_frequency" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_allele_frequency" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_allele_frequency(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_derived_allele_frequency(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"l", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_derived_allele_frequency", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_derived_allele_frequency" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_derived_allele_frequency" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_derived_allele_frequency(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_ancestral_state(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"l", NULL + }; + bool result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_ancestral_state", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_ancestral_state" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_ancestral_state" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (bool)(arg1)->get_ancestral_state(arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_pair_frequency(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus1", (char *)"locus2", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd_get_pair_frequency", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_pair_frequency" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_pair_frequency" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_highd_get_pair_frequency" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_pair_frequency(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_chi(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"l", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_chi", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_chi" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_chi" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_chi(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_derived_chi(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"l", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_derived_chi", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_derived_chi" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_derived_chi" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_derived_chi(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_chi2(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus1", (char *)"locus2", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd_get_chi2", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_chi2" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_chi2" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_highd_get_chi2" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_chi2(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_LD(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus1", (char *)"locus2", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd_get_LD", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_LD" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_LD" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_highd_get_LD" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_LD(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_moment(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus1", (char *)"locus2", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd_get_moment", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_moment" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_moment" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_highd_get_moment" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_moment(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_trait_weight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"t", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_trait_weight", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_trait_weight" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_trait_weight" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_trait_weight(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_fitness(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_fitness", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_fitness" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_fitness" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (double)(arg1)->get_fitness(arg2); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_clone_size(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_clone_size", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_clone_size" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_clone_size" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (int)(arg1)->get_clone_size(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_trait(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + int arg3 = (int) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", (char *)"t", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:haploid_highd_get_trait", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_trait" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_trait" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (obj2) { + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_highd_get_trait" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + } + result = (double)(arg1)->get_trait(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_trait_epistasis(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 = (int) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"t", NULL + }; + SwigValueWrapper< std::vector< coeff_t > > result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:haploid_highd_get_trait_epistasis", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_trait_epistasis" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_trait_epistasis" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + result = (arg1)->get_trait_epistasis(arg2); + { + PyObject *tmpitem, *tmploci; + double tmpval; + int tmporder; + coeff_t *tmpcoeff; + + PyObject *tmplist = PyList_New(0); + for(int i=0; i < (&result)->size(); i++) { + /* set the i-th coefficient */ + tmpcoeff = &((&result)->at(i)); + tmpval = tmpcoeff->value; + tmporder = tmpcoeff->order; + tmpitem = PyTuple_New(2); + /* set the value */ + PyTuple_SET_ITEM(tmpitem, 0, PyFloat_FromDouble(tmpval)); + /* set the loci */ + tmploci = PyTuple_New(tmporder); + for(int j=0; j < tmporder; j++) + PyTuple_SET_ITEM(tmploci, j, PyInt_FromLong((long)(tmpcoeff->loci[j]))); + PyTuple_SET_ITEM(tmpitem, 1, tmploci); + /* set the coeff */ + PyList_Append(tmplist, tmpitem); + } + resultobj = tmplist; + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_fitness_statistics(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + stat_t result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_fitness_statistics" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (arg1)->get_fitness_statistics(); + resultobj = SWIG_NewPointerObj((new stat_t(result)), SWIGTYPE_p_stat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_trait_statistics(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 = (int) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"t", NULL + }; + stat_t result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:haploid_highd_get_trait_statistics", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_trait_statistics" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_trait_statistics" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + result = (arg1)->get_trait_statistics(arg2); + resultobj = SWIG_NewPointerObj((new stat_t(result)), SWIGTYPE_p_stat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_trait_covariance(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"t1", (char *)"t2", NULL + }; + double result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd_get_trait_covariance", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_trait_covariance" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_trait_covariance" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "haploid_highd_get_trait_covariance" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (double)(arg1)->get_trait_covariance(arg2,arg3); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__update_traits(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__update_traits" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + (arg1)->update_traits(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__update_fitness(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__update_fitness" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + (arg1)->update_fitness(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_tree_sample_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_highd_tree_sample_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_tree_sample_set" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_tree_sample_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->tree_sample = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_tree_sample_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_tree_sample_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int) ((arg1)->tree_sample); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd___str__" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (char *)haploid_highd___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd___repr__" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (char *)haploid_highd___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_clone(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + SwigValueWrapper< clone_t > result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_clone", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_clone" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_clone" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + result = haploid_highd_get_clone(arg1,arg2); + resultobj = SWIG_NewPointerObj((new clone_t(result)), SWIGTYPE_p_clone_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_L_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_L_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int)haploid_highd_L_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_number_of_loci_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_number_of_loci_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int)haploid_highd_number_of_loci_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_N_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_N_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int)haploid_highd_N_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_population_size_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_population_size_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int)haploid_highd_population_size_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_generation_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "haploid_highd_generation_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_generation_set" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_generation_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + haploid_highd_generation_set(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_generation_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_generation_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int)haploid_highd_generation_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_number_of_clones_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_number_of_clones_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int)haploid_highd_number_of_clones_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_number_of_traits_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_number_of_traits_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (int)haploid_highd_number_of_traits_get(arg1); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_max_fitness_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_max_fitness_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (double)haploid_highd_max_fitness_get(arg1); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_participation_ratio_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_participation_ratio_get" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = (double)haploid_highd_participation_ratio_get(arg1); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__set_trait_weights(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double *arg2 = (double *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"IN_ARRAY1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd__set_trait_weights", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__set_trait_weights" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, + NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (double*) array_data(array2); + arg3 = (int) array_size(array2,0); + } + haploid_highd__set_trait_weights(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__get_trait_weights(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double *arg2 = (double *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *array2 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"ARGOUT_ARRAY1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd__get_trait_weights", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__get_trait_weights" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp dims[1]; + if (!PyLong_Check(obj1)) + { + const char* typestring = pytype_string(obj1); + PyErr_Format(PyExc_TypeError, + "Int dimension expected. '%s' given.", + typestring); + SWIG_fail; + } + arg3 = (int) PyLong_AsSsize_t(obj1); + if (arg3 == -1 && PyErr_Occurred()) SWIG_fail; + dims[0] = (npy_intp) arg3; + array2 = PyArray_SimpleNew(1, dims, NPY_DOUBLE); + if (!array2) SWIG_fail; + arg2 = (double*) array_data(array2); + } + haploid_highd__get_trait_weights(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + resultobj = SWIG_Python_AppendOutput(resultobj, (PyObject*)array2, 1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_set_genotypes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + int arg4 ; + double *arg5 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + PyArrayObject *array4 = NULL ; + int is_new_object4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"len1", (char *)"len2", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd_set_genotypes", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_set_genotypes" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, + NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (int) array_size(array2,0); + arg3 = (double*) array_data(array2); + } + { + npy_intp size[1] = { + -1 + }; + array4 = obj_to_array_contiguous_allow_conversion(obj2, + NPY_DOUBLE, + &is_new_object4); + if (!array4 || !require_dimensions(array4, 1) || + !require_size(array4, size, 1)) SWIG_fail; + arg4 = (int) array_size(array4,0); + arg5 = (double*) array_data(array4); + } + { + result = (int)haploid_highd_set_genotypes(arg1,arg2,arg3,arg4,arg5); + if (result) { + PyErr_SetString(PyExc_RuntimeError,"Error in the C++ function."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_set_genotypes_and_ancestral_state(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + int arg4 ; + double *arg5 = (double *) 0 ; + int arg6 ; + double *arg7 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + PyArrayObject *array4 = NULL ; + int is_new_object4 = 0 ; + PyArrayObject *array6 = NULL ; + int is_new_object6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"len1", (char *)"len2", (char *)"len3", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:haploid_highd_set_genotypes_and_ancestral_state", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_set_genotypes_and_ancestral_state" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, + NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (int) array_size(array2,0); + arg3 = (double*) array_data(array2); + } + { + npy_intp size[1] = { + -1 + }; + array4 = obj_to_array_contiguous_allow_conversion(obj2, + NPY_DOUBLE, + &is_new_object4); + if (!array4 || !require_dimensions(array4, 1) || + !require_size(array4, size, 1)) SWIG_fail; + arg4 = (int) array_size(array4,0); + arg5 = (double*) array_data(array4); + } + { + npy_intp size[1] = { + -1 + }; + array6 = obj_to_array_contiguous_allow_conversion(obj3, + NPY_DOUBLE, + &is_new_object6); + if (!array6 || !require_dimensions(array6, 1) || + !require_size(array6, size, 1)) SWIG_fail; + arg6 = (int) array_size(array6,0); + arg7 = (double*) array_data(array6); + } + { + result = (int)haploid_highd_set_genotypes_and_ancestral_state(arg1,arg2,arg3,arg4,arg5,arg6,arg7); + if (result) { + PyErr_SetString(PyExc_RuntimeError,"Error in the C++ function."); + SWIG_fail; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + { + if (is_new_object6 && array6) + { + Py_DECREF(array6); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + { + if (is_new_object4 && array4) + { + Py_DECREF(array4); + } + } + { + if (is_new_object6 && array6) + { + Py_DECREF(array6); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__get_genealogy(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + multi_locus_genealogy result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__get_genealogy" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + result = haploid_highd__get_genealogy(arg1); + resultobj = SWIG_NewPointerObj((new multi_locus_genealogy(result)), SWIGTYPE_p_multi_locus_genealogy, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_allele_frequencies(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double *arg2 = (double *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *array2 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"ARGOUT_ARRAY1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_allele_frequencies", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_allele_frequencies" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp dims[1]; + if (!PyLong_Check(obj1)) + { + const char* typestring = pytype_string(obj1); + PyErr_Format(PyExc_TypeError, + "Int dimension expected. '%s' given.", + typestring); + SWIG_fail; + } + arg3 = (int) PyLong_AsSsize_t(obj1); + if (arg3 == -1 && PyErr_Occurred()) SWIG_fail; + dims[0] = (npy_intp) arg3; + array2 = PyArray_SimpleNew(1, dims, NPY_DOUBLE); + if (!array2) SWIG_fail; + arg2 = (double*) array_data(array2); + } + haploid_highd_get_allele_frequencies(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + resultobj = SWIG_Python_AppendOutput(resultobj, (PyObject*)array2, 1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_derived_allele_frequencies(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double *arg2 = (double *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *array2 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"ARGOUT_ARRAY1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_derived_allele_frequencies", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_derived_allele_frequencies" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp dims[1]; + if (!PyLong_Check(obj1)) + { + const char* typestring = pytype_string(obj1); + PyErr_Format(PyExc_TypeError, + "Int dimension expected. '%s' given.", + typestring); + SWIG_fail; + } + arg3 = (int) PyLong_AsSsize_t(obj1); + if (arg3 == -1 && PyErr_Occurred()) SWIG_fail; + dims[0] = (npy_intp) arg3; + array2 = PyArray_SimpleNew(1, dims, NPY_DOUBLE); + if (!array2) SWIG_fail; + arg2 = (double*) array_data(array2); + } + haploid_highd_get_derived_allele_frequencies(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + resultobj = SWIG_Python_AppendOutput(resultobj, (PyObject*)array2, 1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_ancestral_states(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double *arg2 = (double *) 0 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *array2 = NULL ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"ARGOUT_ARRAY1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_ancestral_states", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_ancestral_states" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp dims[1]; + if (!PyLong_Check(obj1)) + { + const char* typestring = pytype_string(obj1); + PyErr_Format(PyExc_TypeError, + "Int dimension expected. '%s' given.", + typestring); + SWIG_fail; + } + arg3 = (int) PyLong_AsSsize_t(obj1); + if (arg3 == -1 && PyErr_Occurred()) SWIG_fail; + dims[0] = (npy_intp) arg3; + array2 = PyArray_SimpleNew(1, dims, NPY_DOUBLE); + if (!array2) SWIG_fail; + arg2 = (double*) array_data(array2); + } + haploid_highd_get_ancestral_states(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + resultobj = SWIG_Python_AppendOutput(resultobj, (PyObject*)array2, 1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_trait_additive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + double *arg2 = (double *) 0 ; + int arg3 ; + int arg4 = (int) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *array2 = NULL ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"ARGOUT_ARRAY1", (char *)"t", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:haploid_highd_get_trait_additive", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_trait_additive" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp dims[1]; + if (!PyLong_Check(obj1)) + { + const char* typestring = pytype_string(obj1); + PyErr_Format(PyExc_TypeError, + "Int dimension expected. '%s' given.", + typestring); + SWIG_fail; + } + arg3 = (int) PyLong_AsSsize_t(obj1); + if (arg3 == -1 && PyErr_Occurred()) SWIG_fail; + dims[0] = (npy_intp) arg3; + array2 = PyArray_SimpleNew(1, dims, NPY_DOUBLE); + if (!array2) SWIG_fail; + arg2 = (double*) array_data(array2); + } + if (obj2) { + ecode4 = SWIG_AsVal_int(obj2, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "haploid_highd_get_trait_additive" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } + haploid_highd_get_trait_additive(arg1,arg2,arg3,arg4); + resultobj = SWIG_Py_Void(); + { + resultobj = SWIG_Python_AppendOutput(resultobj, (PyObject*)array2, 1); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_set_trait_additive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + int arg4 = (int) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"DIM1", (char *)"t", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:haploid_highd_set_trait_additive", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_set_trait_additive" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, + NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (int) array_size(array2,0); + arg3 = (double*) array_data(array2); + } + if (obj2) { + ecode4 = SWIG_AsVal_int(obj2, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "haploid_highd_set_trait_additive" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + } + haploid_highd_set_trait_additive(arg1,arg2,arg3,arg4); + resultobj = SWIG_Py_Void(); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_set_fitness_additive(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + double *arg3 = (double *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyArrayObject *array2 = NULL ; + int is_new_object2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"DIM1", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_set_fitness_additive", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_set_fitness_additive" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + { + npy_intp size[1] = { + -1 + }; + array2 = obj_to_array_contiguous_allow_conversion(obj1, + NPY_DOUBLE, + &is_new_object2); + if (!array2 || !require_dimensions(array2, 1) || + !require_size(array2, size, 1)) SWIG_fail; + arg2 = (int) array_size(array2,0); + arg3 = (double*) array_data(array2); + } + haploid_highd_set_fitness_additive(arg1,arg2,arg3); + resultobj = SWIG_Py_Void(); + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return resultobj; +fail: + { + if (is_new_object2 && array2) + { + Py_DECREF(array2); + } + } + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd_get_genotype(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"n", NULL + }; + boost::dynamic_bitset< > result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:haploid_highd_get_genotype", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd_get_genotype" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd_get_genotype" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = haploid_highd_get_genotype(arg1,arg2); + { + unsigned long L = (&result)->size(); + npy_intp dims[1] = { + (npy_intp) L + }; + auto *array = reinterpret_cast(PyArray_ZEROS(1, dims, NPY_BOOL, 0)); + if (!array) SWIG_fail; + + /* no checks on memory alignments, since we create a new array */ + bool *ptr = (bool *)PyArray_DATA(array); + for(int i=0; i < L; i++, ptr++) + if((&result)->test(i)) + *ptr = true; + resultobj = reinterpret_cast(array); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__set_tree_in_genealogy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + rooted_tree arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", (char *)"tree", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd__set_tree_in_genealogy", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__set_tree_in_genealogy" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd__set_tree_in_genealogy" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_rooted_tree, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "haploid_highd__set_tree_in_genealogy" "', argument " "3"" of type '" "rooted_tree""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_NullReferenceError, "invalid null reference " "in method '" "haploid_highd__set_tree_in_genealogy" "', argument " "3"" of type '" "rooted_tree""'"); + } else { + rooted_tree * temp = reinterpret_cast< rooted_tree * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + try { + haploid_highd__set_tree_in_genealogy(arg1,arg2,SWIG_STD_MOVE(arg3)); + } catch (int err) { + PyErr_SetString(PyExc_ValueError,"Locus not found among the tracked ones."); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_haploid_highd__set_newGeneration_in_genealogy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + haploid_highd *arg1 = (haploid_highd *) 0 ; + int arg2 ; + vector< node_t > arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"locus", (char *)"newGeneration", NULL + }; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:haploid_highd__set_newGeneration_in_genealogy", kwnames, &obj0, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_haploid_highd, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haploid_highd__set_newGeneration_in_genealogy" "', argument " "1"" of type '" "haploid_highd *""'"); + } + arg1 = reinterpret_cast< haploid_highd * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "haploid_highd__set_newGeneration_in_genealogy" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + std::vector< node_t,std::allocator< node_t > > *ptr = (std::vector< node_t,std::allocator< node_t > > *)0; + int res = swig::asptr(obj2, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "haploid_highd__set_newGeneration_in_genealogy" "', argument " "3"" of type '" "vector< node_t >""'"); + } + arg3 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + haploid_highd__set_newGeneration_in_genealogy(arg1,arg2,SWIG_STD_MOVE(arg3)); + } catch (int err) { + PyErr_SetString(PyExc_ValueError,"Locus not found among the tracked ones."); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *haploid_highd_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_haploid_highd, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *haploid_highd_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_hivgene_start_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivgene_start_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene_start_set" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hivgene_start_set" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + if (arg1) (arg1)->start = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivgene_start_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene_start_get" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + result = (unsigned int) ((arg1)->start); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivgene_end_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivgene_end_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene_end_set" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hivgene_end_set" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + if (arg1) (arg1)->end = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivgene_end_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene_end_get" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + result = (unsigned int) ((arg1)->end); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivgene_second_start_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivgene_second_start_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene_second_start_set" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hivgene_second_start_set" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + if (arg1) (arg1)->second_start = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivgene_second_start_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene_second_start_get" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + result = (unsigned int) ((arg1)->second_start); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivgene_second_end_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivgene_second_end_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene_second_end_set" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hivgene_second_end_set" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + if (arg1) (arg1)->second_end = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivgene_second_end_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + unsigned int result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene_second_end_get" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + result = (unsigned int) ((arg1)->second_end); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_hivgene(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + unsigned int arg1 = (unsigned int) 0 ; + unsigned int arg2 = (unsigned int) 10000 ; + unsigned int arg3 = (unsigned int) 0 ; + unsigned int arg4 = (unsigned int) 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *)"start_in", (char *)"end_in", (char *)"second_start_in", (char *)"second_end_in", NULL + }; + hivgene *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOOO:new_hivgene", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_hivgene" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_hivgene" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_hivgene" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_hivgene" "', argument " "4"" of type '" "unsigned int""'"); + } + arg4 = static_cast< unsigned int >(val4); + } + result = (hivgene *)new hivgene(arg1,arg2,arg3,arg4); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivgene___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene___str__" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + result = (char *)hivgene___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivgene___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivgene___repr__" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + result = (char *)hivgene___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_hivgene(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivgene *arg1 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivgene, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_hivgene" "', argument " "1"" of type '" "hivgene *""'"); + } + arg1 = reinterpret_cast< hivgene * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *hivgene_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_hivgene, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *hivgene_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +SWIGINTERN PyObject *_wrap_new_hivpopulation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + int arg1 = (int) 0 ; + int arg2 = (int) 0 ; + double arg3 = (double) 3e-5 ; + double arg4 = (double) 1e-2 ; + double arg5 = (double) 1e-3 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char * kwnames[] = { + (char *)"N", (char *)"rng_seed", (char *)"mutation_rate", (char *)"coinfection_rate", (char *)"crossover_rate", NULL + }; + hivpopulation *result = 0 ; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOOOO:new_hivpopulation", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail; + if (obj0) { + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_hivpopulation" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + } + if (obj1) { + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_hivpopulation" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + } + if (obj2) { + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_hivpopulation" "', argument " "3"" of type '" "double""'"); + } + arg3 = static_cast< double >(val3); + } + if (obj3) { + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_hivpopulation" "', argument " "4"" of type '" "double""'"); + } + arg4 = static_cast< double >(val4); + } + if (obj4) { + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_hivpopulation" "', argument " "5"" of type '" "double""'"); + } + arg5 = static_cast< double >(val5); + } + { + try { + result = (hivpopulation *)new hivpopulation(arg1,arg2,arg3,arg4,arg5); + } catch (int err) { + PyErr_SetString(PyExc_ValueError,"Construction impossible. Please check input args."); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivpopulation, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_hivpopulation(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_hivpopulation" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_gag_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + hivgene *arg2 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_gag_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_gag_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hivpopulation_gag_set" "', argument " "2"" of type '" "hivgene *""'"); + } + arg2 = reinterpret_cast< hivgene * >(argp2); + if (arg1) (arg1)->gag = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_gag_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + hivgene *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_gag_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (hivgene *)& ((arg1)->gag); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_pol_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + hivgene *arg2 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_pol_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_pol_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hivpopulation_pol_set" "', argument " "2"" of type '" "hivgene *""'"); + } + arg2 = reinterpret_cast< hivgene * >(argp2); + if (arg1) (arg1)->pol = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_pol_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + hivgene *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_pol_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (hivgene *)& ((arg1)->pol); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_env_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + hivgene *arg2 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_env_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_env_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hivpopulation_env_set" "', argument " "2"" of type '" "hivgene *""'"); + } + arg2 = reinterpret_cast< hivgene * >(argp2); + if (arg1) (arg1)->env = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_env_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + hivgene *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_env_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (hivgene *)& ((arg1)->env); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_nef_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + hivgene *arg2 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_nef_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_nef_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hivpopulation_nef_set" "', argument " "2"" of type '" "hivgene *""'"); + } + arg2 = reinterpret_cast< hivgene * >(argp2); + if (arg1) (arg1)->nef = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_nef_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + hivgene *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_nef_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (hivgene *)& ((arg1)->nef); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_vif_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + hivgene *arg2 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_vif_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_vif_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hivpopulation_vif_set" "', argument " "2"" of type '" "hivgene *""'"); + } + arg2 = reinterpret_cast< hivgene * >(argp2); + if (arg1) (arg1)->vif = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_vif_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + hivgene *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_vif_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (hivgene *)& ((arg1)->vif); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_vpu_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + hivgene *arg2 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_vpu_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_vpu_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hivpopulation_vpu_set" "', argument " "2"" of type '" "hivgene *""'"); + } + arg2 = reinterpret_cast< hivgene * >(argp2); + if (arg1) (arg1)->vpu = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_vpu_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + hivgene *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_vpu_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (hivgene *)& ((arg1)->vpu); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_vpr_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + hivgene *arg2 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_vpr_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_vpr_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hivpopulation_vpr_set" "', argument " "2"" of type '" "hivgene *""'"); + } + arg2 = reinterpret_cast< hivgene * >(argp2); + if (arg1) (arg1)->vpr = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_vpr_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + hivgene *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_vpr_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (hivgene *)& ((arg1)->vpr); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_tat_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + hivgene *arg2 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_tat_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_tat_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hivpopulation_tat_set" "', argument " "2"" of type '" "hivgene *""'"); + } + arg2 = reinterpret_cast< hivgene * >(argp2); + if (arg1) (arg1)->tat = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_tat_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + hivgene *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_tat_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (hivgene *)& ((arg1)->tat); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_rev_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + hivgene *arg2 = (hivgene *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_rev_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_rev_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_hivgene, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hivpopulation_rev_set" "', argument " "2"" of type '" "hivgene *""'"); + } + arg2 = reinterpret_cast< hivgene * >(argp2); + if (arg1) (arg1)->rev = *arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_rev_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + hivgene *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_rev_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (hivgene *)& ((arg1)->rev); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_hivgene, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_read_replication_coefficients(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + istream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::ifstream temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"model", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:hivpopulation_read_replication_coefficients", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_read_replication_coefficients" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + { + if (!PyString_Check(obj1)) { + PyErr_SetString(PyExc_ValueError, "Expecting a string"); + return NULL; + } + temp2.open(PyString_AsString(obj1)); + arg2 = &temp2; + } + result = (int)(arg1)->read_replication_coefficients(*arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_read_resistance_coefficients(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + istream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::ifstream temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"model", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:hivpopulation_read_resistance_coefficients", kwnames, &obj0, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_read_resistance_coefficients" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + { + if (!PyString_Check(obj1)) { + PyErr_SetString(PyExc_ValueError, "Expecting a string"); + return NULL; + } + temp2.open(PyString_AsString(obj1)); + arg2 = &temp2; + } + result = (int)(arg1)->read_resistance_coefficients(*arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_write_genotypes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + ostream *arg2 = 0 ; + int arg3 ; + string arg4 = (string) "" ; + int arg5 = (int) 0 ; + int arg6 = (int) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::ofstream temp2 ; + int val3 ; + int ecode3 = 0 ; + int val5 ; + int ecode5 = 0 ; + int val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + char * kwnames[] = { + (char *)"self", (char *)"out_genotypes", (char *)"sample_size", (char *)"gt_label", (char *)"start", (char *)"length", NULL + }; + int result; + + (void)self; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:hivpopulation_write_genotypes", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_write_genotypes" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + { + if (!PyString_Check(obj1)) { + PyErr_SetString(PyExc_ValueError, "Expecting a string"); + return NULL; + } + temp2.open(PyString_AsString(obj1)); + arg2 = &temp2; + } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hivpopulation_write_genotypes" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + if (obj3) { + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj3, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "hivpopulation_write_genotypes" "', argument " "4"" of type '" "string""'"); + } + arg4 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + } + if (obj4) { + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hivpopulation_write_genotypes" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + } + if (obj5) { + ecode6 = SWIG_AsVal_int(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "hivpopulation_write_genotypes" "', argument " "6"" of type '" "int""'"); + } + arg6 = static_cast< int >(val6); + } + result = (int)(arg1)->write_genotypes(*arg2,arg3,SWIG_STD_MOVE(arg4),arg5,arg6); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation___str__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation___str__" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (char *)hivpopulation___str__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation___repr__(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation___repr__" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (char *)hivpopulation___repr__(arg1); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_treatment_set(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + + (void)self; + if (!SWIG_Python_UnpackTuple(args, "hivpopulation_treatment_set", 2, 2, swig_obj)) SWIG_fail; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_treatment_set" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hivpopulation_treatment_set" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + hivpopulation_treatment_set(arg1,arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hivpopulation_treatment_get(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + hivpopulation *arg1 = (hivpopulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + double result; + + (void)self; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_hivpopulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hivpopulation_treatment_get" "', argument " "1"" of type '" "hivpopulation *""'"); + } + arg1 = reinterpret_cast< hivpopulation * >(argp1); + result = (double)hivpopulation_treatment_get(arg1); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *hivpopulation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj = NULL; + if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_hivpopulation, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *hivpopulation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} + +static PyMethodDef SwigMethods[] = { + { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL}, + { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL}, + { "delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_O, NULL}, + { "SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_O, NULL}, + { "SwigPyIterator_incr", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_incr, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator_decr", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_decr, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator_distance", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_distance, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator_equal", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_equal, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_O, NULL}, + { "SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_O, NULL}, + { "SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_O, NULL}, + { "SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_O, NULL}, + { "SwigPyIterator_advance", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_advance, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___eq__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___eq__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___ne__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___ne__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___iadd__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___iadd__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___isub__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___isub__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___add__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___add__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, + { "SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_O, NULL}, + { "_intVector_iterator", _wrap__intVector_iterator, METH_O, NULL}, + { "_intVector___nonzero__", _wrap__intVector___nonzero__, METH_O, NULL}, + { "_intVector___bool__", _wrap__intVector___bool__, METH_O, NULL}, + { "_intVector___len__", _wrap__intVector___len__, METH_O, NULL}, + { "_intVector___getslice__", (PyCFunction)(void(*)(void))_wrap__intVector___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector___setslice__", _wrap__intVector___setslice__, METH_VARARGS, NULL}, + { "_intVector___delslice__", (PyCFunction)(void(*)(void))_wrap__intVector___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector___delitem__", _wrap__intVector___delitem__, METH_VARARGS, NULL}, + { "_intVector___getitem__", _wrap__intVector___getitem__, METH_VARARGS, NULL}, + { "_intVector___setitem__", _wrap__intVector___setitem__, METH_VARARGS, NULL}, + { "_intVector_pop", _wrap__intVector_pop, METH_O, NULL}, + { "_intVector_append", (PyCFunction)(void(*)(void))_wrap__intVector_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_empty", _wrap__intVector_empty, METH_O, NULL}, + { "_intVector_size", _wrap__intVector_size, METH_O, NULL}, + { "_intVector_swap", (PyCFunction)(void(*)(void))_wrap__intVector_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_begin", _wrap__intVector_begin, METH_O, NULL}, + { "_intVector_end", _wrap__intVector_end, METH_O, NULL}, + { "_intVector_rbegin", _wrap__intVector_rbegin, METH_O, NULL}, + { "_intVector_rend", _wrap__intVector_rend, METH_O, NULL}, + { "_intVector_clear", _wrap__intVector_clear, METH_O, NULL}, + { "_intVector_get_allocator", _wrap__intVector_get_allocator, METH_O, NULL}, + { "_intVector_pop_back", _wrap__intVector_pop_back, METH_O, NULL}, + { "_intVector_erase", _wrap__intVector_erase, METH_VARARGS, NULL}, + { "new__intVector", _wrap_new__intVector, METH_VARARGS, NULL}, + { "_intVector_push_back", (PyCFunction)(void(*)(void))_wrap__intVector_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_front", _wrap__intVector_front, METH_O, NULL}, + { "_intVector_back", _wrap__intVector_back, METH_O, NULL}, + { "_intVector_assign", (PyCFunction)(void(*)(void))_wrap__intVector_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_resize", _wrap__intVector_resize, METH_VARARGS, NULL}, + { "_intVector_insert", _wrap__intVector_insert, METH_VARARGS, NULL}, + { "_intVector_reserve", (PyCFunction)(void(*)(void))_wrap__intVector_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_capacity", _wrap__intVector_capacity, METH_O, NULL}, + { "delete__intVector", _wrap_delete__intVector, METH_O, "delete__intVector(_intVector self)"}, + { "_intVector_swigregister", _intVector_swigregister, METH_O, NULL}, + { "_intVector_swiginit", _intVector_swiginit, METH_VARARGS, NULL}, + { "vector_tree_step_iterator", _wrap_vector_tree_step_iterator, METH_O, NULL}, + { "vector_tree_step___nonzero__", _wrap_vector_tree_step___nonzero__, METH_O, NULL}, + { "vector_tree_step___bool__", _wrap_vector_tree_step___bool__, METH_O, NULL}, + { "vector_tree_step___len__", _wrap_vector_tree_step___len__, METH_O, NULL}, + { "vector_tree_step___getslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_step___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step___setslice__", _wrap_vector_tree_step___setslice__, METH_VARARGS, NULL}, + { "vector_tree_step___delslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_step___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step___delitem__", _wrap_vector_tree_step___delitem__, METH_VARARGS, NULL}, + { "vector_tree_step___getitem__", _wrap_vector_tree_step___getitem__, METH_VARARGS, NULL}, + { "vector_tree_step___setitem__", _wrap_vector_tree_step___setitem__, METH_VARARGS, NULL}, + { "vector_tree_step_pop", _wrap_vector_tree_step_pop, METH_O, NULL}, + { "vector_tree_step_append", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_empty", _wrap_vector_tree_step_empty, METH_O, NULL}, + { "vector_tree_step_size", _wrap_vector_tree_step_size, METH_O, NULL}, + { "vector_tree_step_swap", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_begin", _wrap_vector_tree_step_begin, METH_O, NULL}, + { "vector_tree_step_end", _wrap_vector_tree_step_end, METH_O, NULL}, + { "vector_tree_step_rbegin", _wrap_vector_tree_step_rbegin, METH_O, NULL}, + { "vector_tree_step_rend", _wrap_vector_tree_step_rend, METH_O, NULL}, + { "vector_tree_step_clear", _wrap_vector_tree_step_clear, METH_O, NULL}, + { "vector_tree_step_get_allocator", _wrap_vector_tree_step_get_allocator, METH_O, NULL}, + { "vector_tree_step_pop_back", _wrap_vector_tree_step_pop_back, METH_O, NULL}, + { "vector_tree_step_erase", _wrap_vector_tree_step_erase, METH_VARARGS, NULL}, + { "new_vector_tree_step", _wrap_new_vector_tree_step, METH_VARARGS, NULL}, + { "vector_tree_step_push_back", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_front", _wrap_vector_tree_step_front, METH_O, NULL}, + { "vector_tree_step_back", _wrap_vector_tree_step_back, METH_O, NULL}, + { "vector_tree_step_assign", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_resize", _wrap_vector_tree_step_resize, METH_VARARGS, NULL}, + { "vector_tree_step_insert", _wrap_vector_tree_step_insert, METH_VARARGS, NULL}, + { "vector_tree_step_reserve", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_capacity", _wrap_vector_tree_step_capacity, METH_O, NULL}, + { "delete_vector_tree_step", _wrap_delete_vector_tree_step, METH_O, "delete_vector_tree_step(vector_tree_step self)"}, + { "vector_tree_step_swigregister", vector_tree_step_swigregister, METH_O, NULL}, + { "vector_tree_step_swiginit", vector_tree_step_swiginit, METH_VARARGS, NULL}, + { "vector_tree_key_iterator", _wrap_vector_tree_key_iterator, METH_O, NULL}, + { "vector_tree_key___nonzero__", _wrap_vector_tree_key___nonzero__, METH_O, NULL}, + { "vector_tree_key___bool__", _wrap_vector_tree_key___bool__, METH_O, NULL}, + { "vector_tree_key___len__", _wrap_vector_tree_key___len__, METH_O, NULL}, + { "vector_tree_key___getslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_key___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key___setslice__", _wrap_vector_tree_key___setslice__, METH_VARARGS, NULL}, + { "vector_tree_key___delslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_key___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key___delitem__", _wrap_vector_tree_key___delitem__, METH_VARARGS, NULL}, + { "vector_tree_key___getitem__", _wrap_vector_tree_key___getitem__, METH_VARARGS, NULL}, + { "vector_tree_key___setitem__", _wrap_vector_tree_key___setitem__, METH_VARARGS, NULL}, + { "vector_tree_key_pop", _wrap_vector_tree_key_pop, METH_O, NULL}, + { "vector_tree_key_append", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_empty", _wrap_vector_tree_key_empty, METH_O, NULL}, + { "vector_tree_key_size", _wrap_vector_tree_key_size, METH_O, NULL}, + { "vector_tree_key_swap", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_begin", _wrap_vector_tree_key_begin, METH_O, NULL}, + { "vector_tree_key_end", _wrap_vector_tree_key_end, METH_O, NULL}, + { "vector_tree_key_rbegin", _wrap_vector_tree_key_rbegin, METH_O, NULL}, + { "vector_tree_key_rend", _wrap_vector_tree_key_rend, METH_O, NULL}, + { "vector_tree_key_clear", _wrap_vector_tree_key_clear, METH_O, NULL}, + { "vector_tree_key_get_allocator", _wrap_vector_tree_key_get_allocator, METH_O, NULL}, + { "vector_tree_key_pop_back", _wrap_vector_tree_key_pop_back, METH_O, NULL}, + { "vector_tree_key_erase", _wrap_vector_tree_key_erase, METH_VARARGS, NULL}, + { "new_vector_tree_key", _wrap_new_vector_tree_key, METH_VARARGS, NULL}, + { "vector_tree_key_push_back", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_front", _wrap_vector_tree_key_front, METH_O, NULL}, + { "vector_tree_key_back", _wrap_vector_tree_key_back, METH_O, NULL}, + { "vector_tree_key_assign", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_resize", _wrap_vector_tree_key_resize, METH_VARARGS, NULL}, + { "vector_tree_key_insert", _wrap_vector_tree_key_insert, METH_VARARGS, NULL}, + { "vector_tree_key_reserve", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_capacity", _wrap_vector_tree_key_capacity, METH_O, NULL}, + { "delete_vector_tree_key", _wrap_delete_vector_tree_key, METH_O, "delete_vector_tree_key(vector_tree_key self)"}, + { "vector_tree_key_swigregister", vector_tree_key_swigregister, METH_O, NULL}, + { "vector_tree_key_swiginit", vector_tree_key_swiginit, METH_VARARGS, NULL}, + { "list_tree_key_iterator", _wrap_list_tree_key_iterator, METH_O, NULL}, + { "list_tree_key___nonzero__", _wrap_list_tree_key___nonzero__, METH_O, NULL}, + { "list_tree_key___bool__", _wrap_list_tree_key___bool__, METH_O, NULL}, + { "list_tree_key___len__", _wrap_list_tree_key___len__, METH_O, NULL}, + { "list_tree_key___getslice__", (PyCFunction)(void(*)(void))_wrap_list_tree_key___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key___setslice__", _wrap_list_tree_key___setslice__, METH_VARARGS, NULL}, + { "list_tree_key___delslice__", (PyCFunction)(void(*)(void))_wrap_list_tree_key___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key___delitem__", _wrap_list_tree_key___delitem__, METH_VARARGS, NULL}, + { "list_tree_key___getitem__", _wrap_list_tree_key___getitem__, METH_VARARGS, NULL}, + { "list_tree_key___setitem__", _wrap_list_tree_key___setitem__, METH_VARARGS, NULL}, + { "list_tree_key_pop", _wrap_list_tree_key_pop, METH_O, NULL}, + { "list_tree_key_append", (PyCFunction)(void(*)(void))_wrap_list_tree_key_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_empty", _wrap_list_tree_key_empty, METH_O, NULL}, + { "list_tree_key_size", _wrap_list_tree_key_size, METH_O, NULL}, + { "list_tree_key_swap", (PyCFunction)(void(*)(void))_wrap_list_tree_key_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_begin", _wrap_list_tree_key_begin, METH_O, NULL}, + { "list_tree_key_end", _wrap_list_tree_key_end, METH_O, NULL}, + { "list_tree_key_rbegin", _wrap_list_tree_key_rbegin, METH_O, NULL}, + { "list_tree_key_rend", _wrap_list_tree_key_rend, METH_O, NULL}, + { "list_tree_key_clear", _wrap_list_tree_key_clear, METH_O, NULL}, + { "list_tree_key_get_allocator", _wrap_list_tree_key_get_allocator, METH_O, NULL}, + { "list_tree_key_pop_back", _wrap_list_tree_key_pop_back, METH_O, NULL}, + { "list_tree_key_erase", _wrap_list_tree_key_erase, METH_VARARGS, NULL}, + { "new_list_tree_key", _wrap_new_list_tree_key, METH_VARARGS, NULL}, + { "list_tree_key_push_back", (PyCFunction)(void(*)(void))_wrap_list_tree_key_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_front", _wrap_list_tree_key_front, METH_O, NULL}, + { "list_tree_key_back", _wrap_list_tree_key_back, METH_O, NULL}, + { "list_tree_key_assign", (PyCFunction)(void(*)(void))_wrap_list_tree_key_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_resize", _wrap_list_tree_key_resize, METH_VARARGS, NULL}, + { "list_tree_key_insert", _wrap_list_tree_key_insert, METH_VARARGS, NULL}, + { "list_tree_key_pop_front", _wrap_list_tree_key_pop_front, METH_O, NULL}, + { "list_tree_key_push_front", (PyCFunction)(void(*)(void))_wrap_list_tree_key_push_front, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_reverse", _wrap_list_tree_key_reverse, METH_O, NULL}, + { "delete_list_tree_key", _wrap_delete_list_tree_key, METH_O, "delete_list_tree_key(list_tree_key self)"}, + { "list_tree_key_swigregister", list_tree_key_swigregister, METH_O, NULL}, + { "list_tree_key_swiginit", list_tree_key_swiginit, METH_VARARGS, NULL}, + { "map_key_edge_iterator", _wrap_map_key_edge_iterator, METH_O, NULL}, + { "map_key_edge___nonzero__", _wrap_map_key_edge___nonzero__, METH_O, NULL}, + { "map_key_edge___bool__", _wrap_map_key_edge___bool__, METH_O, NULL}, + { "map_key_edge___len__", _wrap_map_key_edge___len__, METH_O, NULL}, + { "map_key_edge___getitem__", (PyCFunction)(void(*)(void))_wrap_map_key_edge___getitem__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge___delitem__", (PyCFunction)(void(*)(void))_wrap_map_key_edge___delitem__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_has_key", (PyCFunction)(void(*)(void))_wrap_map_key_edge_has_key, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_keys", _wrap_map_key_edge_keys, METH_O, NULL}, + { "map_key_edge_values", _wrap_map_key_edge_values, METH_O, NULL}, + { "map_key_edge_items", _wrap_map_key_edge_items, METH_O, NULL}, + { "map_key_edge___contains__", (PyCFunction)(void(*)(void))_wrap_map_key_edge___contains__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_key_iterator", _wrap_map_key_edge_key_iterator, METH_O, NULL}, + { "map_key_edge_value_iterator", _wrap_map_key_edge_value_iterator, METH_O, NULL}, + { "map_key_edge___setitem__", _wrap_map_key_edge___setitem__, METH_VARARGS, NULL}, + { "map_key_edge_asdict", _wrap_map_key_edge_asdict, METH_O, NULL}, + { "new_map_key_edge", _wrap_new_map_key_edge, METH_VARARGS, NULL}, + { "map_key_edge_empty", _wrap_map_key_edge_empty, METH_O, NULL}, + { "map_key_edge_size", _wrap_map_key_edge_size, METH_O, NULL}, + { "map_key_edge_swap", (PyCFunction)(void(*)(void))_wrap_map_key_edge_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_begin", _wrap_map_key_edge_begin, METH_O, NULL}, + { "map_key_edge_end", _wrap_map_key_edge_end, METH_O, NULL}, + { "map_key_edge_rbegin", _wrap_map_key_edge_rbegin, METH_O, NULL}, + { "map_key_edge_rend", _wrap_map_key_edge_rend, METH_O, NULL}, + { "map_key_edge_clear", _wrap_map_key_edge_clear, METH_O, NULL}, + { "map_key_edge_get_allocator", _wrap_map_key_edge_get_allocator, METH_O, NULL}, + { "map_key_edge_count", (PyCFunction)(void(*)(void))_wrap_map_key_edge_count, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_erase", _wrap_map_key_edge_erase, METH_VARARGS, NULL}, + { "map_key_edge_find", (PyCFunction)(void(*)(void))_wrap_map_key_edge_find, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_lower_bound", (PyCFunction)(void(*)(void))_wrap_map_key_edge_lower_bound, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_upper_bound", (PyCFunction)(void(*)(void))_wrap_map_key_edge_upper_bound, METH_VARARGS|METH_KEYWORDS, NULL}, + { "delete_map_key_edge", _wrap_delete_map_key_edge, METH_O, "delete_map_key_edge(map_key_edge self)"}, + { "map_key_edge_swigregister", map_key_edge_swigregister, METH_O, NULL}, + { "map_key_edge_swiginit", map_key_edge_swiginit, METH_VARARGS, NULL}, + { "map_key_node_iterator", _wrap_map_key_node_iterator, METH_O, NULL}, + { "map_key_node___nonzero__", _wrap_map_key_node___nonzero__, METH_O, NULL}, + { "map_key_node___bool__", _wrap_map_key_node___bool__, METH_O, NULL}, + { "map_key_node___len__", _wrap_map_key_node___len__, METH_O, NULL}, + { "map_key_node___getitem__", (PyCFunction)(void(*)(void))_wrap_map_key_node___getitem__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node___delitem__", (PyCFunction)(void(*)(void))_wrap_map_key_node___delitem__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_has_key", (PyCFunction)(void(*)(void))_wrap_map_key_node_has_key, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_keys", _wrap_map_key_node_keys, METH_O, NULL}, + { "map_key_node_values", _wrap_map_key_node_values, METH_O, NULL}, + { "map_key_node_items", _wrap_map_key_node_items, METH_O, NULL}, + { "map_key_node___contains__", (PyCFunction)(void(*)(void))_wrap_map_key_node___contains__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_key_iterator", _wrap_map_key_node_key_iterator, METH_O, NULL}, + { "map_key_node_value_iterator", _wrap_map_key_node_value_iterator, METH_O, NULL}, + { "map_key_node___setitem__", _wrap_map_key_node___setitem__, METH_VARARGS, NULL}, + { "map_key_node_asdict", _wrap_map_key_node_asdict, METH_O, NULL}, + { "new_map_key_node", _wrap_new_map_key_node, METH_VARARGS, NULL}, + { "map_key_node_empty", _wrap_map_key_node_empty, METH_O, NULL}, + { "map_key_node_size", _wrap_map_key_node_size, METH_O, NULL}, + { "map_key_node_swap", (PyCFunction)(void(*)(void))_wrap_map_key_node_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_begin", _wrap_map_key_node_begin, METH_O, NULL}, + { "map_key_node_end", _wrap_map_key_node_end, METH_O, NULL}, + { "map_key_node_rbegin", _wrap_map_key_node_rbegin, METH_O, NULL}, + { "map_key_node_rend", _wrap_map_key_node_rend, METH_O, NULL}, + { "map_key_node_clear", _wrap_map_key_node_clear, METH_O, NULL}, + { "map_key_node_get_allocator", _wrap_map_key_node_get_allocator, METH_O, NULL}, + { "map_key_node_count", (PyCFunction)(void(*)(void))_wrap_map_key_node_count, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_erase", _wrap_map_key_node_erase, METH_VARARGS, NULL}, + { "map_key_node_find", (PyCFunction)(void(*)(void))_wrap_map_key_node_find, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_lower_bound", (PyCFunction)(void(*)(void))_wrap_map_key_node_lower_bound, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_upper_bound", (PyCFunction)(void(*)(void))_wrap_map_key_node_upper_bound, METH_VARARGS|METH_KEYWORDS, NULL}, + { "delete_map_key_node", _wrap_delete_map_key_node, METH_O, "delete_map_key_node(map_key_node self)"}, + { "map_key_node_swigregister", map_key_node_swigregister, METH_O, NULL}, + { "map_key_node_swiginit", map_key_node_swiginit, METH_VARARGS, NULL}, + { "vector_polymorphism_iterator", _wrap_vector_polymorphism_iterator, METH_O, NULL}, + { "vector_polymorphism___nonzero__", _wrap_vector_polymorphism___nonzero__, METH_O, NULL}, + { "vector_polymorphism___bool__", _wrap_vector_polymorphism___bool__, METH_O, NULL}, + { "vector_polymorphism___len__", _wrap_vector_polymorphism___len__, METH_O, NULL}, + { "vector_polymorphism___getslice__", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism___setslice__", _wrap_vector_polymorphism___setslice__, METH_VARARGS, NULL}, + { "vector_polymorphism___delslice__", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism___delitem__", _wrap_vector_polymorphism___delitem__, METH_VARARGS, NULL}, + { "vector_polymorphism___getitem__", _wrap_vector_polymorphism___getitem__, METH_VARARGS, NULL}, + { "vector_polymorphism___setitem__", _wrap_vector_polymorphism___setitem__, METH_VARARGS, NULL}, + { "vector_polymorphism_pop", _wrap_vector_polymorphism_pop, METH_O, NULL}, + { "vector_polymorphism_append", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_empty", _wrap_vector_polymorphism_empty, METH_O, NULL}, + { "vector_polymorphism_size", _wrap_vector_polymorphism_size, METH_O, NULL}, + { "vector_polymorphism_swap", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_begin", _wrap_vector_polymorphism_begin, METH_O, NULL}, + { "vector_polymorphism_end", _wrap_vector_polymorphism_end, METH_O, NULL}, + { "vector_polymorphism_rbegin", _wrap_vector_polymorphism_rbegin, METH_O, NULL}, + { "vector_polymorphism_rend", _wrap_vector_polymorphism_rend, METH_O, NULL}, + { "vector_polymorphism_clear", _wrap_vector_polymorphism_clear, METH_O, NULL}, + { "vector_polymorphism_get_allocator", _wrap_vector_polymorphism_get_allocator, METH_O, NULL}, + { "vector_polymorphism_pop_back", _wrap_vector_polymorphism_pop_back, METH_O, NULL}, + { "vector_polymorphism_erase", _wrap_vector_polymorphism_erase, METH_VARARGS, NULL}, + { "new_vector_polymorphism", _wrap_new_vector_polymorphism, METH_VARARGS, NULL}, + { "vector_polymorphism_push_back", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_front", _wrap_vector_polymorphism_front, METH_O, NULL}, + { "vector_polymorphism_back", _wrap_vector_polymorphism_back, METH_O, NULL}, + { "vector_polymorphism_assign", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_resize", _wrap_vector_polymorphism_resize, METH_VARARGS, NULL}, + { "vector_polymorphism_insert", _wrap_vector_polymorphism_insert, METH_VARARGS, NULL}, + { "vector_polymorphism_reserve", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_capacity", _wrap_vector_polymorphism_capacity, METH_O, NULL}, + { "delete_vector_polymorphism", _wrap_delete_vector_polymorphism, METH_O, "delete_vector_polymorphism(vector_polymorphism self)"}, + { "vector_polymorphism_swigregister", vector_polymorphism_swigregister, METH_O, NULL}, + { "vector_polymorphism_swiginit", vector_polymorphism_swiginit, METH_VARARGS, NULL}, + { "vector_tree_node_iterator", _wrap_vector_tree_node_iterator, METH_O, NULL}, + { "vector_tree_node___nonzero__", _wrap_vector_tree_node___nonzero__, METH_O, NULL}, + { "vector_tree_node___bool__", _wrap_vector_tree_node___bool__, METH_O, NULL}, + { "vector_tree_node___len__", _wrap_vector_tree_node___len__, METH_O, NULL}, + { "vector_tree_node___getslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_node___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node___setslice__", _wrap_vector_tree_node___setslice__, METH_VARARGS, NULL}, + { "vector_tree_node___delslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_node___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node___delitem__", _wrap_vector_tree_node___delitem__, METH_VARARGS, NULL}, + { "vector_tree_node___getitem__", _wrap_vector_tree_node___getitem__, METH_VARARGS, NULL}, + { "vector_tree_node___setitem__", _wrap_vector_tree_node___setitem__, METH_VARARGS, NULL}, + { "vector_tree_node_pop", _wrap_vector_tree_node_pop, METH_O, NULL}, + { "vector_tree_node_append", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_empty", _wrap_vector_tree_node_empty, METH_O, NULL}, + { "vector_tree_node_size", _wrap_vector_tree_node_size, METH_O, NULL}, + { "vector_tree_node_swap", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_begin", _wrap_vector_tree_node_begin, METH_O, NULL}, + { "vector_tree_node_end", _wrap_vector_tree_node_end, METH_O, NULL}, + { "vector_tree_node_rbegin", _wrap_vector_tree_node_rbegin, METH_O, NULL}, + { "vector_tree_node_rend", _wrap_vector_tree_node_rend, METH_O, NULL}, + { "vector_tree_node_clear", _wrap_vector_tree_node_clear, METH_O, NULL}, + { "vector_tree_node_get_allocator", _wrap_vector_tree_node_get_allocator, METH_O, NULL}, + { "vector_tree_node_pop_back", _wrap_vector_tree_node_pop_back, METH_O, NULL}, + { "vector_tree_node_erase", _wrap_vector_tree_node_erase, METH_VARARGS, NULL}, + { "new_vector_tree_node", _wrap_new_vector_tree_node, METH_VARARGS, NULL}, + { "vector_tree_node_push_back", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_front", _wrap_vector_tree_node_front, METH_O, NULL}, + { "vector_tree_node_back", _wrap_vector_tree_node_back, METH_O, NULL}, + { "vector_tree_node_assign", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_resize", _wrap_vector_tree_node_resize, METH_VARARGS, NULL}, + { "vector_tree_node_insert", _wrap_vector_tree_node_insert, METH_VARARGS, NULL}, + { "vector_tree_node_reserve", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_capacity", _wrap_vector_tree_node_capacity, METH_O, NULL}, + { "delete_vector_tree_node", _wrap_delete_vector_tree_node, METH_O, "delete_vector_tree_node(vector_tree_node self)"}, + { "vector_tree_node_swigregister", vector_tree_node_swigregister, METH_O, NULL}, + { "vector_tree_node_swiginit", vector_tree_node_swiginit, METH_VARARGS, NULL}, + { "index_value_pair_index_set", _wrap_index_value_pair_index_set, METH_VARARGS, "Index"}, + { "index_value_pair_index_get", _wrap_index_value_pair_index_get, METH_O, "Index"}, + { "index_value_pair_val_set", _wrap_index_value_pair_val_set, METH_VARARGS, "Value"}, + { "index_value_pair_val_get", _wrap_index_value_pair_val_get, METH_O, "Value"}, + { "new_index_value_pair", (PyCFunction)(void(*)(void))_wrap_new_index_value_pair, METH_VARARGS|METH_KEYWORDS, "Pair of an index and a value"}, + { "index_value_pair___str__", _wrap_index_value_pair___str__, METH_O, "index_value_pair___str__(index_value_pair self) -> char const *"}, + { "index_value_pair___repr__", _wrap_index_value_pair___repr__, METH_O, "index_value_pair___repr__(index_value_pair self) -> char const *"}, + { "delete_index_value_pair", _wrap_delete_index_value_pair, METH_O, "delete_index_value_pair(index_value_pair self)"}, + { "index_value_pair_swigregister", index_value_pair_swigregister, METH_O, NULL}, + { "index_value_pair_swiginit", index_value_pair_swiginit, METH_VARARGS, NULL}, + { "genotype_value_pair_genotype_set", _wrap_genotype_value_pair_genotype_set, METH_VARARGS, "Genotype"}, + { "genotype_value_pair_genotype_get", _wrap_genotype_value_pair_genotype_get, METH_O, "Genotype"}, + { "genotype_value_pair_val_set", _wrap_genotype_value_pair_val_set, METH_VARARGS, "Value"}, + { "genotype_value_pair_val_get", _wrap_genotype_value_pair_val_get, METH_O, "Value"}, + { "new_genotype_value_pair", (PyCFunction)(void(*)(void))_wrap_new_genotype_value_pair, METH_VARARGS|METH_KEYWORDS, "Pair of a genotype and a value"}, + { "genotype_value_pair___str__", _wrap_genotype_value_pair___str__, METH_O, "genotype_value_pair___str__(genotype_value_pair self) -> char const *"}, + { "genotype_value_pair___repr__", _wrap_genotype_value_pair___repr__, METH_O, "genotype_value_pair___repr__(genotype_value_pair self) -> char const *"}, + { "delete_genotype_value_pair", _wrap_delete_genotype_value_pair, METH_O, "delete_genotype_value_pair(genotype_value_pair self)"}, + { "genotype_value_pair_swigregister", genotype_value_pair_swigregister, METH_O, NULL}, + { "genotype_value_pair_swiginit", genotype_value_pair_swiginit, METH_VARARGS, NULL}, + { "stat_mean_set", _wrap_stat_mean_set, METH_VARARGS, "Mean"}, + { "stat_mean_get", _wrap_stat_mean_get, METH_O, "Mean"}, + { "stat_variance_set", _wrap_stat_variance_set, METH_VARARGS, "Variance"}, + { "stat_variance_get", _wrap_stat_variance_get, METH_O, "Variance"}, + { "new_stat", (PyCFunction)(void(*)(void))_wrap_new_stat, METH_VARARGS|METH_KEYWORDS, "Mean and variance of a statistical distribution"}, + { "stat___str__", _wrap_stat___str__, METH_O, "stat___str__(stat self) -> char const *"}, + { "stat___repr__", _wrap_stat___repr__, METH_O, "stat___repr__(stat self) -> char const *"}, + { "delete_stat", _wrap_delete_stat, METH_O, "delete_stat(stat self)"}, + { "stat_swigregister", stat_swigregister, METH_O, NULL}, + { "stat_swiginit", stat_swiginit, METH_VARARGS, NULL}, + { "new_haploid_lowd", (PyCFunction)(void(*)(void))_wrap_new_haploid_lowd, METH_VARARGS|METH_KEYWORDS, "\n" + "Construct a low-dimensional population with certain parameters.\n" + "\n" + "Parameters:\n" + " - L : number of loci (at least 1)\n" + " - rng_seed : seed for the random number generator\n" + "\n" + ""}, + { "delete_haploid_lowd", _wrap_delete_haploid_lowd, METH_O, "delete_haploid_lowd(haploid_lowd self)"}, + { "haploid_lowd_carrying_capacity_set", _wrap_haploid_lowd_carrying_capacity_set, METH_VARARGS, "current carrying capacity of the environment"}, + { "haploid_lowd_carrying_capacity_get", _wrap_haploid_lowd_carrying_capacity_get, METH_O, "current carrying capacity of the environment"}, + { "haploid_lowd_outcrossing_rate_set", _wrap_haploid_lowd_outcrossing_rate_set, METH_VARARGS, "outcrossing rate (probability of sexual reproduction per generation)"}, + { "haploid_lowd_outcrossing_rate_get", _wrap_haploid_lowd_outcrossing_rate_get, METH_O, "outcrossing rate (probability of sexual reproduction per generation)"}, + { "haploid_lowd_circular_set", _wrap_haploid_lowd_circular_set, METH_VARARGS, "is the genome circular?"}, + { "haploid_lowd_circular_get", _wrap_haploid_lowd_circular_get, METH_O, "is the genome circular?"}, + { "haploid_lowd__get_mutation_rate", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__get_mutation_rate, METH_VARARGS|METH_KEYWORDS, "haploid_lowd__get_mutation_rate(haploid_lowd self, int locus, int direction) -> double"}, + { "haploid_lowd__get_recombination_model", _wrap_haploid_lowd__get_recombination_model, METH_O, "\n" + "Model of recombination to use\n" + "\n" + "Available values:\n" + "\n" + " - FFPopSim.FREE_RECOMBINATION: free shuffling between parents\n" + " - FFPopSim.CROSSOVERS: block recombination with crossover probability\n" + " - FFPopSim.SINGLE_CROSSOVER: block recombination with crossover probability\n" + "\n" + ""}, + { "haploid_lowd_get_recombination_rate", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_recombination_rate, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the recombination rate between the specified locus and the following one.\n" + "\n" + ""}, + { "haploid_lowd_set_allele_frequencies", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_set_allele_frequencies, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize the population in linkage equilibrium with specified allele frequencies.\n" + "\n" + "Parameters:\n" + " - frequencies: an array of length L with all allele frequencies\n" + " - N: set the population size and, if still unset, the carrying\n" + " capacity to this value\n" + "\n" + ".. note:: the population size is only used for resampling and has therefore\n" + " no effect on the speed of the simulation.\n" + "\n" + ""}, + { "haploid_lowd_set_wildtype", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_set_wildtype, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize population of N individuals with the - allele at all loci (wildtype)\n" + "\n" + "Parameters:\n" + " - N: the number of individuals\n" + "\n" + ".. note:: the carrying capacity is set to the same value if still unset.\n" + "\n" + ""}, + { "haploid_lowd__set_recombination_model", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_recombination_model, METH_VARARGS|METH_KEYWORDS, "haploid_lowd__set_recombination_model(haploid_lowd self, int rec_model) -> int"}, + { "haploid_lowd__set_recombination_rates", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_recombination_rates, METH_VARARGS|METH_KEYWORDS, "haploid_lowd__set_recombination_rates(haploid_lowd self, double * rec_rates, int rec_model=-1) -> int"}, + { "haploid_lowd_evolve", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_evolve, METH_VARARGS|METH_KEYWORDS, "\n" + "Evolve for some generations\n" + "\n" + "Parameters:\n" + " - gen: number of generations to evolve the population, defaults to one\n" + "\n" + ""}, + { "haploid_lowd_evolve_norec", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_evolve_norec, METH_VARARGS|METH_KEYWORDS, "\n" + "Evolve for some generations without recombination\n" + "\n" + "Parameters:\n" + " - gen: number of generations to evolve the population\n" + "\n" + ""}, + { "haploid_lowd_evolve_deterministic", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_evolve_deterministic, METH_VARARGS|METH_KEYWORDS, "\n" + "Evolve for some generations deterministically (skips the resampling)\n" + "\n" + "Parameters:\n" + " - gen: number of generations to evolve the population\n" + "\n" + ""}, + { "haploid_lowd_get_genotype_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_genotype_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of a genotype\n" + "\n" + "Parameters:\n" + " - genotype: genotype, whose the frequency is to be returned\n" + "\n" + "Returns:\n" + " - the frequency of the genotype\n" + "\n" + ""}, + { "haploid_lowd_get_allele_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_allele_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of the + allele\n" + "\n" + "Parameters:\n" + " - locus: locus, at which the frequency of the + allele is to be computed\n" + "\n" + "Returns:\n" + " - the frequency of the + allele, :math:`\\nu_i := \\frac{1 + \\left}{2}`, where :math:`s_i \\in \\{-1, 1\\}`.\n" + "\n" + ""}, + { "haploid_lowd_get_pair_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_pair_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of genotypes with the + allele at both loci.\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the joint frequency of the + alleles\n" + "\n" + ""}, + { "haploid_lowd_get_chi", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_chi, METH_VARARGS|METH_KEYWORDS, "\n" + "Get chi of an allele in the -/+ basis\n" + "\n" + "Parameters:\n" + " - locus: locus whose chi is to be computed\n" + "\n" + "Returns:\n" + " - the chi of that allele, :math:`\\chi_i := \\left`, where :math:`s_i \\in \\{-1, 1\\}`.\n" + "\n" + ""}, + { "haploid_lowd_get_chi2", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_chi2, METH_VARARGS|METH_KEYWORDS, "\n" + "Get :math:`\\chi_{ij}`\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the linkage disequilibiurm between them, i.e. :math:`\\chi_{ij} := \\left - \\chi_i \\cdot \\chi_j`.\n" + "\n" + ""}, + { "haploid_lowd_get_LD", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_LD, METH_VARARGS|METH_KEYWORDS, "\n" + "Get linkage disequilibrium\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the linkage disequilibiurm between them, i.e. :math:`D_{ij} := 1 / 4 \\left[\\left - \\chi_i \\cdot \\chi_j\\right]`.\n" + "\n" + ""}, + { "haploid_lowd_get_moment", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_moment, METH_VARARGS|METH_KEYWORDS, "\n" + "Get moment of two alleles in the -/+ basis\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the second moment, i.e. :math:`\\left`, where :math:`s_i, s_j \\in \\{-1, 1\\}`.\n" + "\n" + ""}, + { "haploid_lowd_genotype_entropy", _wrap_haploid_lowd_genotype_entropy, METH_O, "\n" + "Get the genotype entropy of the population\n" + "\n" + ".. note:: the genotype entropy is defined as :math:`-\\sum_{i=0}^{2^L} p_i \\log p_i`.\n" + "\n" + ""}, + { "haploid_lowd_allele_entropy", _wrap_haploid_lowd_allele_entropy, METH_O, "\n" + "get the allele entropy of the population\n" + "\n" + ".. note:: the allele entropy is defined as :math:`-\\sum_{i=0}^{L} \\left[\\nu_i\\log \\nu_i + (1-\\nu_i)\\log(1-\\nu_i)\\right]`.\n" + "\n" + ""}, + { "haploid_lowd_get_fitness", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_fitness, METH_VARARGS|METH_KEYWORDS, "\n" + "Get fitness values of a genotype\n" + "\n" + "Parameters:\n" + " - genotype: genotype whose fitness is to be calculated. This can either be an integer or in binary format, e.g. 5 = 0b101\n" + "\n" + "Returns:\n" + " - the fitness of that genotype.\n" + "\n" + ""}, + { "haploid_lowd_get_fitness_coefficient", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_fitness_coefficient, METH_VARARGS|METH_KEYWORDS, "\n" + "Get fitness coefficient of a combination (bitset) of loci\n" + "\n" + "Parameters:\n" + " - loci_bitset: Bitset of loci interested by the coefficient (see below). This can either be an integer or in binary format, e.g. 5 = 0b101\n" + "\n" + ".. note:: Examples for loci_bitset:\n" + " - 0: fitness baseline for the population\n" + " - (1 << X): additive coefficient for locus X\n" + " - (1 << X) + (1 << Y): epistatic (2-locus) coefficient between loci X and Y\n" + "\n" + ".. note:: Remember that FFPopSim uses 1/-1 based hypercubes.\n" + "\n" + "Returns:\n" + " - the fitness coefficient of that combination of loci.\n" + "\n" + ""}, + { "haploid_lowd_get_fitness_statistics", _wrap_haploid_lowd_get_fitness_statistics, METH_O, "haploid_lowd_get_fitness_statistics(haploid_lowd self) -> stat"}, + { "haploid_lowd___str__", _wrap_haploid_lowd___str__, METH_O, "x.__str__() <==> str(x)"}, + { "haploid_lowd___repr__", _wrap_haploid_lowd___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "haploid_lowd_L_get", _wrap_haploid_lowd_L_get, METH_O, "Number of loci (read-only)"}, + { "haploid_lowd_number_of_loci_get", _wrap_haploid_lowd_number_of_loci_get, METH_O, "Number of loci (read-only)"}, + { "haploid_lowd_N_get", _wrap_haploid_lowd_N_get, METH_O, "Population size (read-only)"}, + { "haploid_lowd_population_size_get", _wrap_haploid_lowd_population_size_get, METH_O, "Population size (read-only)"}, + { "haploid_lowd_generation_set", _wrap_haploid_lowd_generation_set, METH_VARARGS, "Current generation (read-only)"}, + { "haploid_lowd_generation_get", _wrap_haploid_lowd_generation_get, METH_O, "Current generation (read-only)"}, + { "haploid_lowd__set_genotypes", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_genotypes, METH_VARARGS|METH_KEYWORDS, "haploid_lowd__set_genotypes(haploid_lowd self, int len1, int len2) -> int"}, + { "haploid_lowd__set_mutation_rates", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_mutation_rates, METH_VARARGS|METH_KEYWORDS, "haploid_lowd__set_mutation_rates(haploid_lowd self, double * IN_ARRAY2) -> int"}, + { "haploid_lowd_get_fitnesses", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_fitnesses, METH_VARARGS|METH_KEYWORDS, "Get the fitness of all possible genotypes."}, + { "haploid_lowd_get_fitness_coefficients", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_fitness_coefficients, METH_VARARGS|METH_KEYWORDS, "\n" + "Get all fitness coefficients.\n" + "\n" + "The order of the coefficient is by bitset of interested loci:\n" + "- the population baseline is at position 0\n" + "- the additive term of locus X is at position (1 << X), i.e. 2^X\n" + "- the 2-locus epistatic term between loci X and Y is at (1 << X) + (1 << Y), i.e. 2^X + 2^Y\n" + "and so on.\n" + "\n" + "For instance, the following indices contain:\n" + "0 aka 0b0: baseline for the population\n" + "1 aka 0b1: additive coefficient for the first locus\n" + "2 aka 0b10: additive coefficient for the second locus\n" + "3 aka 0b11: epistatic coefficient bewteen locus one and two\n" + "4 aka 0b100: additive coefficient for the third locus\n" + "5 aka 0b101: epistatic coefficient between locus one and three\n" + "6 aka 0b110: epistatic coefficient between locus two and three\n" + "7 aka 0b111: epistatic coefficient among loci one, two, and three (3-locus term)\n" + "and so on.\n" + "\n" + ""}, + { "haploid_lowd__set_fitness_func", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_fitness_func, METH_VARARGS|METH_KEYWORDS, "haploid_lowd__set_fitness_func(haploid_lowd self, int len1, int len2) -> int"}, + { "haploid_lowd__set_fitness_coeff", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_fitness_coeff, METH_VARARGS|METH_KEYWORDS, "haploid_lowd__set_fitness_coeff(haploid_lowd self, int len1, int len2) -> int"}, + { "haploid_lowd_set_fitness_additive", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_set_fitness_additive, METH_VARARGS|METH_KEYWORDS, "\n" + "Set an additive fitness landscape. Coefficients obey +/- convention.\n" + "\n" + "Parameters:\n" + " - coefficients: array/list of additive fitness coefficients. It must have length L.\n" + "\n" + ""}, + { "haploid_lowd_swigregister", haploid_lowd_swigregister, METH_O, NULL}, + { "haploid_lowd_swiginit", haploid_lowd_swiginit, METH_VARARGS, NULL}, + { "clone_genotype_set", _wrap_clone_genotype_set, METH_VARARGS, "Genotype of the clone"}, + { "clone_genotype_get", _wrap_clone_genotype_get, METH_O, "Genotype of the clone"}, + { "clone_fitness_set", _wrap_clone_fitness_set, METH_VARARGS, "Fitness of the clone"}, + { "clone_fitness_get", _wrap_clone_fitness_get, METH_O, "Fitness of the clone"}, + { "clone_clone_size_set", _wrap_clone_clone_size_set, METH_VARARGS, "Number of individuals of the clone"}, + { "clone_clone_size_get", _wrap_clone_clone_size_get, METH_O, "Number of individuals of the clone"}, + { "new_clone", (PyCFunction)(void(*)(void))_wrap_new_clone, METH_VARARGS|METH_KEYWORDS, "Clone of isogenetic individuals"}, + { "clone___eq__", (PyCFunction)(void(*)(void))_wrap_clone___eq__, METH_VARARGS|METH_KEYWORDS, "clone___eq__(clone self, clone other) -> bool"}, + { "clone___ne__", (PyCFunction)(void(*)(void))_wrap_clone___ne__, METH_VARARGS|METH_KEYWORDS, "clone___ne__(clone self, clone other) -> bool"}, + { "clone___lt__", (PyCFunction)(void(*)(void))_wrap_clone___lt__, METH_VARARGS|METH_KEYWORDS, "clone___lt__(clone self, clone other) -> bool"}, + { "clone___gt__", (PyCFunction)(void(*)(void))_wrap_clone___gt__, METH_VARARGS|METH_KEYWORDS, "clone___gt__(clone self, clone other) -> bool"}, + { "clone___str__", _wrap_clone___str__, METH_O, "x.__str__() <==> str(x)"}, + { "clone___repr__", _wrap_clone___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "clone_number_of_traits_get", _wrap_clone_number_of_traits_get, METH_O, "Number of traits (read-only)"}, + { "clone__get_trait", (PyCFunction)(void(*)(void))_wrap_clone__get_trait, METH_VARARGS|METH_KEYWORDS, "clone__get_trait(clone self, int DIM1)"}, + { "delete_clone", _wrap_delete_clone, METH_O, "delete_clone(clone self)"}, + { "clone_swigregister", clone_swigregister, METH_O, NULL}, + { "clone_swiginit", clone_swiginit, METH_VARARGS, NULL}, + { "tree_key_index_set", _wrap_tree_key_index_set, METH_VARARGS, "Index of the key"}, + { "tree_key_index_get", _wrap_tree_key_index_get, METH_O, "Index of the key"}, + { "tree_key_age_set", _wrap_tree_key_age_set, METH_VARARGS, "Age [in generations]"}, + { "tree_key_age_get", _wrap_tree_key_age_get, METH_O, "Age [in generations]"}, + { "tree_key___eq__", (PyCFunction)(void(*)(void))_wrap_tree_key___eq__, METH_VARARGS|METH_KEYWORDS, "tree_key___eq__(tree_key self, tree_key other) -> bool"}, + { "tree_key___ne__", (PyCFunction)(void(*)(void))_wrap_tree_key___ne__, METH_VARARGS|METH_KEYWORDS, "tree_key___ne__(tree_key self, tree_key other) -> bool"}, + { "tree_key___lt__", (PyCFunction)(void(*)(void))_wrap_tree_key___lt__, METH_VARARGS|METH_KEYWORDS, "tree_key___lt__(tree_key self, tree_key other) -> bool"}, + { "tree_key___gt__", (PyCFunction)(void(*)(void))_wrap_tree_key___gt__, METH_VARARGS|METH_KEYWORDS, "tree_key___gt__(tree_key self, tree_key other) -> bool"}, + { "new_tree_key", (PyCFunction)(void(*)(void))_wrap_new_tree_key, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize new tree_key.\n" + "\n" + "Parameters:\n" + " - index: index of the key\n" + " - age: age of the key\n" + "\n" + ""}, + { "tree_key___str__", _wrap_tree_key___str__, METH_O, "x.__str__() <==> str(x)"}, + { "tree_key___repr__", _wrap_tree_key___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "tree_key___hash__", _wrap_tree_key___hash__, METH_O, "tree_key___hash__(tree_key self) -> long const"}, + { "delete_tree_key", _wrap_delete_tree_key, METH_O, "delete_tree_key(tree_key self)"}, + { "tree_key_swigregister", tree_key_swigregister, METH_O, NULL}, + { "tree_key_swiginit", tree_key_swiginit, METH_VARARGS, NULL}, + { "tree_step_pos_set", _wrap_tree_step_pos_set, METH_VARARGS, "Position"}, + { "tree_step_pos_get", _wrap_tree_step_pos_get, METH_O, "Position"}, + { "tree_step_step_set", _wrap_tree_step_step_set, METH_VARARGS, "Step [in generations]"}, + { "tree_step_step_get", _wrap_tree_step_step_get, METH_O, "Step [in generations]"}, + { "tree_step___lt__", (PyCFunction)(void(*)(void))_wrap_tree_step___lt__, METH_VARARGS|METH_KEYWORDS, "tree_step___lt__(tree_step self, tree_step other) -> bool"}, + { "tree_step___gt__", (PyCFunction)(void(*)(void))_wrap_tree_step___gt__, METH_VARARGS|METH_KEYWORDS, "tree_step___gt__(tree_step self, tree_step other) -> bool"}, + { "tree_step___eq__", (PyCFunction)(void(*)(void))_wrap_tree_step___eq__, METH_VARARGS|METH_KEYWORDS, "tree_step___eq__(tree_step self, tree_step other) -> bool"}, + { "new_tree_step", (PyCFunction)(void(*)(void))_wrap_new_tree_step, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize new step.\n" + "\n" + "Parameters:\n" + " - pos: position\n" + " - step: length of step\n" + "\n" + ""}, + { "tree_step___str__", _wrap_tree_step___str__, METH_O, "x.__str__() <==> str(x)"}, + { "tree_step___repr__", _wrap_tree_step___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "tree_step___hash__", _wrap_tree_step___hash__, METH_O, "tree_step___hash__(tree_step self) -> long const"}, + { "delete_tree_step", _wrap_delete_tree_step, METH_O, "delete_tree_step(tree_step self)"}, + { "tree_step_swigregister", tree_step_swigregister, METH_O, NULL}, + { "tree_step_swiginit", tree_step_swiginit, METH_VARARGS, NULL}, + { "tree_node_parent_node_set", _wrap_tree_node_parent_node_set, METH_VARARGS, "Parent tree key"}, + { "tree_node_parent_node_get", _wrap_tree_node_parent_node_get, METH_O, "Parent tree key"}, + { "tree_node_own_key_set", _wrap_tree_node_own_key_set, METH_VARARGS, "Own tree key"}, + { "tree_node_own_key_get", _wrap_tree_node_own_key_get, METH_O, "Own tree key"}, + { "tree_node__child_edges_set", _wrap_tree_node__child_edges_set, METH_VARARGS, "tree_node__child_edges_set(tree_node self, list_tree_key child_edges)"}, + { "tree_node__child_edges_get", _wrap_tree_node__child_edges_get, METH_O, "tree_node__child_edges_get(tree_node self) -> list_tree_key"}, + { "tree_node_fitness_set", _wrap_tree_node_fitness_set, METH_VARARGS, "Fitness of the clone represented by the node"}, + { "tree_node_fitness_get", _wrap_tree_node_fitness_get, METH_O, "Fitness of the clone represented by the node"}, + { "tree_node__weight_distribution_set", _wrap_tree_node__weight_distribution_set, METH_VARARGS, "tree_node__weight_distribution_set(tree_node self, vector_tree_step weight_distribution)"}, + { "tree_node__weight_distribution_get", _wrap_tree_node__weight_distribution_get, METH_O, "tree_node__weight_distribution_get(tree_node self) -> vector_tree_step"}, + { "tree_node_number_of_offspring_set", _wrap_tree_node_number_of_offspring_set, METH_VARARGS, "Number of offspring"}, + { "tree_node_number_of_offspring_get", _wrap_tree_node_number_of_offspring_get, METH_O, "Number of offspring"}, + { "tree_node_clone_size_set", _wrap_tree_node_clone_size_set, METH_VARARGS, "Size of the clone represented by the node"}, + { "tree_node_clone_size_get", _wrap_tree_node_clone_size_get, METH_O, "Size of the clone represented by the node"}, + { "tree_node_sampled_set", _wrap_tree_node_sampled_set, METH_VARARGS, "tree_node_sampled_set(tree_node self, int sampled)"}, + { "tree_node_sampled_get", _wrap_tree_node_sampled_get, METH_O, "tree_node_sampled_get(tree_node self) -> int"}, + { "tree_node_sequence_set", _wrap_tree_node_sequence_set, METH_VARARGS, "tree_node_sequence_set(tree_node self, boost::dynamic_bitset< > sequence)"}, + { "tree_node_sequence_get", _wrap_tree_node_sequence_get, METH_O, "tree_node_sequence_get(tree_node self) -> boost::dynamic_bitset< >"}, + { "tree_node___str__", _wrap_tree_node___str__, METH_O, "x.__str__() <==> str(x)"}, + { "tree_node___repr__", _wrap_tree_node___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "tree_node__get_crossover_chunk", (PyCFunction)(void(*)(void))_wrap_tree_node__get_crossover_chunk, METH_VARARGS|METH_KEYWORDS, "tree_node__get_crossover_chunk(tree_node self, int i) -> int"}, + { "tree_node__set_crossover_chunk", (PyCFunction)(void(*)(void))_wrap_tree_node__set_crossover_chunk, METH_VARARGS|METH_KEYWORDS, "tree_node__set_crossover_chunk(tree_node self, int value, int i)"}, + { "new_tree_node", _wrap_new_tree_node, METH_NOARGS, "Node of a phylogenetic tree"}, + { "delete_tree_node", _wrap_delete_tree_node, METH_O, "delete_tree_node(tree_node self)"}, + { "tree_node_swigregister", tree_node_swigregister, METH_O, NULL}, + { "tree_node_swiginit", tree_node_swiginit, METH_VARARGS, NULL}, + { "tree_edge_parent_node_set", _wrap_tree_edge_parent_node_set, METH_VARARGS, "Parent tree key"}, + { "tree_edge_parent_node_get", _wrap_tree_edge_parent_node_get, METH_O, "Parent tree key"}, + { "tree_edge_own_key_set", _wrap_tree_edge_own_key_set, METH_VARARGS, "Own tree key"}, + { "tree_edge_own_key_get", _wrap_tree_edge_own_key_get, METH_O, "Own tree key"}, + { "tree_edge_length_set", _wrap_tree_edge_length_set, METH_VARARGS, "Edge length [in generations]"}, + { "tree_edge_length_get", _wrap_tree_edge_length_get, METH_O, "Edge length [in generations]"}, + { "tree_edge_number_of_offspring_set", _wrap_tree_edge_number_of_offspring_set, METH_VARARGS, "Number of offspring"}, + { "tree_edge_number_of_offspring_get", _wrap_tree_edge_number_of_offspring_get, METH_O, "Number of offspring"}, + { "tree_edge___str__", _wrap_tree_edge___str__, METH_O, "x.__str__() <==> str(x)"}, + { "tree_edge___repr__", _wrap_tree_edge___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "tree_edge__get_segment_chunk", (PyCFunction)(void(*)(void))_wrap_tree_edge__get_segment_chunk, METH_VARARGS|METH_KEYWORDS, "tree_edge__get_segment_chunk(tree_edge self, int i) -> int"}, + { "new_tree_edge", _wrap_new_tree_edge, METH_NOARGS, "Edge of a phylogenetic tree"}, + { "delete_tree_edge", _wrap_delete_tree_edge, METH_O, "delete_tree_edge(tree_edge self)"}, + { "tree_edge_swigregister", tree_edge_swigregister, METH_O, NULL}, + { "tree_edge_swiginit", tree_edge_swiginit, METH_VARARGS, NULL}, + { "polymorphism_birth_set", _wrap_polymorphism_birth_set, METH_VARARGS, "Birth generation"}, + { "polymorphism_birth_get", _wrap_polymorphism_birth_get, METH_O, "Birth generation"}, + { "polymorphism_sweep_time_set", _wrap_polymorphism_sweep_time_set, METH_VARARGS, "Sweep time [in generations]"}, + { "polymorphism_sweep_time_get", _wrap_polymorphism_sweep_time_get, METH_O, "Sweep time [in generations]"}, + { "polymorphism_effect_set", _wrap_polymorphism_effect_set, METH_VARARGS, "Fitness effect of the mutation"}, + { "polymorphism_effect_get", _wrap_polymorphism_effect_get, METH_O, "Fitness effect of the mutation"}, + { "polymorphism_fitness_set", _wrap_polymorphism_fitness_set, METH_VARARGS, "Relative fitness of the clone at birth"}, + { "polymorphism_fitness_get", _wrap_polymorphism_fitness_get, METH_O, "Relative fitness of the clone at birth"}, + { "polymorphism_fitness_variance_set", _wrap_polymorphism_fitness_variance_set, METH_VARARGS, "Fitness variance of the population at birth"}, + { "polymorphism_fitness_variance_get", _wrap_polymorphism_fitness_variance_get, METH_O, "Fitness variance of the population at birth"}, + { "new_polymorphism", (PyCFunction)(void(*)(void))_wrap_new_polymorphism, METH_VARARGS|METH_KEYWORDS, "Polymorphism history"}, + { "polymorphism___str__", _wrap_polymorphism___str__, METH_O, "x.__str__() <==> str(x)"}, + { "polymorphism___repr__", _wrap_polymorphism___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "delete_polymorphism", _wrap_delete_polymorphism, METH_O, "delete_polymorphism(polymorphism self)"}, + { "polymorphism_swigregister", polymorphism_swigregister, METH_O, NULL}, + { "polymorphism_swiginit", polymorphism_swiginit, METH_VARARGS, NULL}, + { "rooted_tree__edges_set", _wrap_rooted_tree__edges_set, METH_VARARGS, "rooted_tree__edges_set(rooted_tree self, map_key_edge edges)"}, + { "rooted_tree__edges_get", _wrap_rooted_tree__edges_get, METH_O, "rooted_tree__edges_get(rooted_tree self) -> map_key_edge"}, + { "rooted_tree__nodes_set", _wrap_rooted_tree__nodes_set, METH_VARARGS, "rooted_tree__nodes_set(rooted_tree self, map_key_node nodes)"}, + { "rooted_tree__nodes_get", _wrap_rooted_tree__nodes_get, METH_O, "rooted_tree__nodes_get(rooted_tree self) -> map_key_node"}, + { "rooted_tree__leafs_set", _wrap_rooted_tree__leafs_set, METH_VARARGS, "rooted_tree__leafs_set(rooted_tree self, vector_tree_key leafs)"}, + { "rooted_tree__leafs_get", _wrap_rooted_tree__leafs_get, METH_O, "rooted_tree__leafs_get(rooted_tree self) -> vector_tree_key"}, + { "rooted_tree__sampled_leafs_set", _wrap_rooted_tree__sampled_leafs_set, METH_VARARGS, "rooted_tree__sampled_leafs_set(rooted_tree self, vector_tree_key sampled_leafs)"}, + { "rooted_tree__sampled_leafs_get", _wrap_rooted_tree__sampled_leafs_get, METH_O, "rooted_tree__sampled_leafs_get(rooted_tree self) -> vector_tree_key"}, + { "rooted_tree_root_set", _wrap_rooted_tree_root_set, METH_VARARGS, "rooted_tree_root_set(rooted_tree self, tree_key root)"}, + { "rooted_tree_root_get", _wrap_rooted_tree_root_get, METH_O, "rooted_tree_root_get(rooted_tree self) -> tree_key"}, + { "rooted_tree_MRCA_set", _wrap_rooted_tree_MRCA_set, METH_VARARGS, "rooted_tree_MRCA_set(rooted_tree self, tree_key MRCA)"}, + { "rooted_tree_MRCA_get", _wrap_rooted_tree_MRCA_get, METH_O, "rooted_tree_MRCA_get(rooted_tree self) -> tree_key"}, + { "new_rooted_tree", _wrap_new_rooted_tree, METH_NOARGS, "\n" + "Rooted phylogenetic tree.\n" + "\n" + "This class is used to represent the phylogenetic tree of a single locus.\n" + "It is possible to print the tree in Newick format, to get the subtree\n" + "spanned by some of the leaves, and to look at the tree nodes and edges.\n" + "\n" + ""}, + { "delete_rooted_tree", _wrap_delete_rooted_tree, METH_O, "delete_rooted_tree(rooted_tree self)"}, + { "rooted_tree_external_branch_length", _wrap_rooted_tree_external_branch_length, METH_O, "\n" + "Measure the length of the external branches.\n" + "\n" + "Returns:\n" + " - length: the sum of the lengths of the external branches.\n" + "\n" + ""}, + { "rooted_tree_total_branch_length", _wrap_rooted_tree_total_branch_length, METH_O, "\n" + "Measure the length of the branches.\n" + "\n" + "Returns:\n" + " - length: the sum of the lengths of all branches.\n" + "\n" + ""}, + { "rooted_tree_calc_weight_distribution", (PyCFunction)(void(*)(void))_wrap_rooted_tree_calc_weight_distribution, METH_VARARGS|METH_KEYWORDS, "\n" + "Recalculate the weight of some internal nodes.\n" + "\n" + "Parameters:\n" + " - subtree_root: the tree_key of the node whose hanging subtree is recalculated\n" + "\n" + "Returns:\n" + " - error code: zero if successful\n" + "\n" + ""}, + { "rooted_tree_print_newick", _wrap_rooted_tree_print_newick, METH_O, "\n" + "Print the tree in Newick format.\n" + "\n" + "Returns:\n" + " - tree: string of the tree in Newick format.\n" + "\n" + ".. note:: You can pipe the output of this function to a cStingIO.StringIO\n" + " for further manipulations.\n" + "\n" + ""}, + { "rooted_tree_print_sequences", _wrap_rooted_tree_print_sequences, METH_O, "rooted_tree_print_sequences(rooted_tree self) -> string"}, + { "rooted_tree_subtree_newick", (PyCFunction)(void(*)(void))_wrap_rooted_tree_subtree_newick, METH_VARARGS|METH_KEYWORDS, "\n" + "Print a subtree in Newick format.\n" + "\n" + "Parameters:\n" + " - subtree_root: tree_key of the root of the subtree to print\n" + "\n" + "Returns:\n" + " - subtree: string of the subtree in Newick format.\n" + "\n" + ".. note:: You can pipe the output of this function to a cStingIO.StringIO\n" + " for further manipulations.\n" + "\n" + ""}, + { "rooted_tree_print_weight_distribution", (PyCFunction)(void(*)(void))_wrap_rooted_tree_print_weight_distribution, METH_VARARGS|METH_KEYWORDS, "rooted_tree_print_weight_distribution(rooted_tree self, tree_key node_key) -> string"}, + { "rooted_tree_read_newick", (PyCFunction)(void(*)(void))_wrap_rooted_tree_read_newick, METH_VARARGS|METH_KEYWORDS, "\n" + "Read from Newick string.\n" + "\n" + "Returns:\n" + " - zero if successful, nonzero otherwise.\n" + "\n" + ""}, + { "rooted_tree_get_sampled_leafs", _wrap_rooted_tree_get_sampled_leafs, METH_O, "rooted_tree_get_sampled_leafs(rooted_tree self) -> vector_tree_key"}, + { "rooted_tree_set_sampled_leafs", (PyCFunction)(void(*)(void))_wrap_rooted_tree_set_sampled_leafs, METH_VARARGS|METH_KEYWORDS, "rooted_tree_set_sampled_leafs(rooted_tree self, vector_tree_key leafs)"}, + { "rooted_tree___str__", _wrap_rooted_tree___str__, METH_O, "x.__str__() <==> str(x)"}, + { "rooted_tree___repr__", _wrap_rooted_tree___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "rooted_tree__ancestors_at_age", (PyCFunction)(void(*)(void))_wrap_rooted_tree__ancestors_at_age, METH_VARARGS|METH_KEYWORDS, "rooted_tree__ancestors_at_age(rooted_tree self, int age, tree_key subtree_root) -> vector_tree_key"}, + { "rooted_tree_create_subtree_from_keys", (PyCFunction)(void(*)(void))_wrap_rooted_tree_create_subtree_from_keys, METH_VARARGS|METH_KEYWORDS, "\n" + "Create a subtree from a list of leaves.\n" + "\n" + "Parameters:\n" + " - leaves: the leaves used to contruct the subtree\n" + "\n" + "Returns:\n" + " - subtree: the subtree spanned by those leaves.\n" + "\n" + ".. note:: leaves can be a Python list or a numpy array of tree_key, or a vector_tree_key.\n" + "\n" + ""}, + { "rooted_tree_swigregister", rooted_tree_swigregister, METH_O, NULL}, + { "rooted_tree_swiginit", rooted_tree_swiginit, METH_VARARGS, NULL}, + { "new_multi_locus_genealogy", _wrap_new_multi_locus_genealogy, METH_NOARGS, "Default constructor"}, + { "delete_multi_locus_genealogy", _wrap_delete_multi_locus_genealogy, METH_O, "delete_multi_locus_genealogy(multi_locus_genealogy self)"}, + { "multi_locus_genealogy_track_locus", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy_track_locus, METH_VARARGS|METH_KEYWORDS, "\n" + "Start tracking a new locus.\n" + "\n" + "Parameters:\n" + " - new_locus: locus to be tracked\n" + "\n" + ".. note:: the locus gets appended to the 'loci' array.\n" + "\n" + ""}, + { "multi_locus_genealogy_reset", _wrap_multi_locus_genealogy_reset, METH_O, "Reset (empty) the genealogy."}, + { "multi_locus_genealogy_reset_but_loci", _wrap_multi_locus_genealogy_reset_but_loci, METH_O, "Reset (empty) the genealogy but keep the loci indices."}, + { "multi_locus_genealogy___str__", _wrap_multi_locus_genealogy___str__, METH_O, "x.__str__() <==> str(x)"}, + { "multi_locus_genealogy___repr__", _wrap_multi_locus_genealogy___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "multi_locus_genealogy__get_number_of_loci", _wrap_multi_locus_genealogy__get_number_of_loci, METH_O, "multi_locus_genealogy__get_number_of_loci(multi_locus_genealogy self) -> int"}, + { "multi_locus_genealogy__get_loci", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy__get_loci, METH_VARARGS|METH_KEYWORDS, "multi_locus_genealogy__get_loci(multi_locus_genealogy self, int DIM1)"}, + { "multi_locus_genealogy_get_tree", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy_get_tree, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the genealogy tree for a certain locus.\n" + "\n" + "Parameters:\n" + " - locus: site whose tree is being returned\n" + "\n" + ".. note:: if you want to know what loci are being tracked, look into the 'loci'\n" + " attribute.\n" + "\n" + ""}, + { "multi_locus_genealogy__set_tree", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy__set_tree, METH_VARARGS|METH_KEYWORDS, "multi_locus_genealogy__set_tree(multi_locus_genealogy self, int locus, rooted_tree tree)"}, + { "multi_locus_genealogy__get_newGeneration", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy__get_newGeneration, METH_VARARGS|METH_KEYWORDS, "multi_locus_genealogy__get_newGeneration(multi_locus_genealogy self, int locus) -> vector_tree_node"}, + { "multi_locus_genealogy__set_newGeneration", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy__set_newGeneration, METH_VARARGS|METH_KEYWORDS, "multi_locus_genealogy__set_newGeneration(multi_locus_genealogy self, int locus, vector_tree_node newGeneration)"}, + { "multi_locus_genealogy_swigregister", multi_locus_genealogy_swigregister, METH_O, NULL}, + { "multi_locus_genealogy_swiginit", multi_locus_genealogy_swiginit, METH_VARARGS, NULL}, + { "new_haploid_highd", (PyCFunction)(void(*)(void))_wrap_new_haploid_highd, METH_VARARGS|METH_KEYWORDS, "\n" + "Construct a high-dimensional population with certain parameters.\n" + "\n" + "Parameters:\n" + " - L: number of loci\n" + " - rng_seed: seed for the random generator. If zero (default) pick a random number\n" + " - number_of_traits: number of phenotypic traits, defaults to one\n" + " - all_polymorphic: option to use an infinite-sites model tracking ancestral alleles\n" + " (only available with a single phenotypic trait and zero mutation rate)\n" + "\n" + ""}, + { "delete_haploid_highd", _wrap_delete_haploid_highd, METH_O, "delete_haploid_highd(haploid_highd self)"}, + { "haploid_highd_carrying_capacity_set", _wrap_haploid_highd_carrying_capacity_set, METH_VARARGS, "current carrying capacity of the environment"}, + { "haploid_highd_carrying_capacity_get", _wrap_haploid_highd_carrying_capacity_get, METH_O, "current carrying capacity of the environment"}, + { "haploid_highd_outcrossing_rate_set", _wrap_haploid_highd_outcrossing_rate_set, METH_VARARGS, "outcrossing rate (probability of sexual reproduction per generation)"}, + { "haploid_highd_outcrossing_rate_get", _wrap_haploid_highd_outcrossing_rate_get, METH_O, "outcrossing rate (probability of sexual reproduction per generation)"}, + { "haploid_highd_crossover_rate_set", _wrap_haploid_highd_crossover_rate_set, METH_VARARGS, "crossover rate (probability of crossover per site per generation)"}, + { "haploid_highd_crossover_rate_get", _wrap_haploid_highd_crossover_rate_get, METH_O, "crossover rate (probability of crossover per site per generation)"}, + { "haploid_highd_recombination_model_set", _wrap_haploid_highd_recombination_model_set, METH_VARARGS, "\n" + "Model of recombination to use\n" + "\n" + "Available values:\n" + " - FFPopSim.FREE_RECOMBINATION: free reassortment of all loci between parents\n" + " - FFPopSim.CROSSOVERS: linear chromosome with crossover probability per locus\n" + "\n" + ""}, + { "haploid_highd_recombination_model_get", _wrap_haploid_highd_recombination_model_get, METH_O, "\n" + "Model of recombination to use\n" + "\n" + "Available values:\n" + " - FFPopSim.FREE_RECOMBINATION: free reassortment of all loci between parents\n" + " - FFPopSim.CROSSOVERS: linear chromosome with crossover probability per locus\n" + "\n" + ""}, + { "haploid_highd_circular_set", _wrap_haploid_highd_circular_set, METH_VARARGS, "is the genome circular?"}, + { "haploid_highd_circular_get", _wrap_haploid_highd_circular_get, METH_O, "is the genome circular?"}, + { "haploid_highd_growth_rate_set", _wrap_haploid_highd_growth_rate_set, METH_VARARGS, "\n" + "Growth rate\n" + "\n" + "This value is used to determine how fast a population converges to the\n" + "carrying capacity.\n" + "\n" + "This parameter must be set strictly larger than 1 (very slow growth) and not\n" + "too big to avoid population explosion. The default is 2, which means that a\n" + "freely expanding population (N << carrying capacity) approximately doubles in\n" + "size every generation.\n" + "\n" + "Note that when the population is shrinking, in order to avoid extinction, the\n" + "population decreases by ten times or so only. If you want a hard bottleneck,\n" + "use the bottleneck function.\n" + "\n" + ""}, + { "haploid_highd_growth_rate_get", _wrap_haploid_highd_growth_rate_get, METH_O, "\n" + "Growth rate\n" + "\n" + "This value is used to determine how fast a population converges to the\n" + "carrying capacity.\n" + "\n" + "This parameter must be set strictly larger than 1 (very slow growth) and not\n" + "too big to avoid population explosion. The default is 2, which means that a\n" + "freely expanding population (N << carrying capacity) approximately doubles in\n" + "size every generation.\n" + "\n" + "Note that when the population is shrinking, in order to avoid extinction, the\n" + "population decreases by ten times or so only. If you want a hard bottleneck,\n" + "use the bottleneck function.\n" + "\n" + ""}, + { "haploid_highd_all_polymorphic_set", _wrap_haploid_highd_all_polymorphic_set, METH_VARARGS, "All polymorphic?"}, + { "haploid_highd_all_polymorphic_get", _wrap_haploid_highd_all_polymorphic_get, METH_O, "All polymorphic?"}, + { "haploid_highd__get_mutation_rate", _wrap_haploid_highd__get_mutation_rate, METH_O, "haploid_highd__get_mutation_rate(haploid_highd self) -> double"}, + { "haploid_highd__set_mutation_rate", (PyCFunction)(void(*)(void))_wrap_haploid_highd__set_mutation_rate, METH_VARARGS|METH_KEYWORDS, "haploid_highd__set_mutation_rate(haploid_highd self, double m)"}, + { "haploid_highd_get_all_polymorphic", _wrap_haploid_highd_get_all_polymorphic, METH_O, "haploid_highd_get_all_polymorphic(haploid_highd self) -> bool"}, + { "haploid_highd_set_all_polymorphic", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_all_polymorphic, METH_VARARGS|METH_KEYWORDS, "haploid_highd_set_all_polymorphic(haploid_highd self, bool ap)"}, + { "haploid_highd__get_polymorphisms", _wrap_haploid_highd__get_polymorphisms, METH_O, "haploid_highd__get_polymorphisms(haploid_highd self) -> vector_polymorphism"}, + { "haploid_highd__get_fixed_mutations", _wrap_haploid_highd__get_fixed_mutations, METH_O, "haploid_highd__get_fixed_mutations(haploid_highd self) -> vector_polymorphism"}, + { "haploid_highd__get_number_of_mutations", _wrap_haploid_highd__get_number_of_mutations, METH_O, "haploid_highd__get_number_of_mutations(haploid_highd self) -> _intVector"}, + { "haploid_highd_set_allele_frequencies", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_allele_frequencies, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize the population according to the given allele frequencies in linkage equilibrium.\n" + "\n" + "Parameters:\n" + " - frequencies: an array of length L with all allele frequencies\n" + " - N: set the population size and, if still unset, the carrying\n" + " capacity to this value\n" + "\n" + ""}, + { "haploid_highd_set_wildtype", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_wildtype, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize a population of wildtype individuals\n" + "\n" + "Parameters:\n" + " - N: the number of individuals\n" + "\n" + ".. note:: the carrying capacity is set to the same value if still unset.\n" + "\n" + ""}, + { "haploid_highd_track_locus_genealogy", (PyCFunction)(void(*)(void))_wrap_haploid_highd_track_locus_genealogy, METH_VARARGS|METH_KEYWORDS, "\n" + "\n" + "Track the genealogy of some loci.\n" + "\n" + "Parameters:\n" + " - loci: sites whose genealogy is being stored\n" + "\n" + "Returns:\n" + " - zero if successful\n" + "\n" + ""}, + { "haploid_highd_add_genotype", (PyCFunction)(void(*)(void))_wrap_haploid_highd_add_genotype, METH_VARARGS|METH_KEYWORDS, "\n" + "Add new individuals to the population with certain genotypes\n" + "\n" + "Parameters:\n" + " - genotype: genotype to add to the population (Boolean list)\n" + " - n: number of new individuals carrying that genotype\n" + "\n" + ""}, + { "haploid_highd_add_trait_coefficient", (PyCFunction)(void(*)(void))_wrap_haploid_highd_add_trait_coefficient, METH_VARARGS|METH_KEYWORDS, "\n" + "Add a coefficient to the trait landscape.\n" + "\n" + "Parameters:\n" + " - value: value of the coefficient\n" + " - loci: array/list of loci indexed by the coefficient.\n" + " - t: number of the trait to be changed\n" + "\n" + "**Example**: to set a second-order epistatic term :math:`t_{ij} = 0.1`, use ``add_trait_coefficient(0.1, [i, j])``.\n" + "\n" + ".. warning:: the -/+ basis is used throughout the library. If you are used to the 0/1 basis, keep in mind that the interaction series-expansion is different.\n" + "\n" + ""}, + { "haploid_highd_clear_trait", (PyCFunction)(void(*)(void))_wrap_haploid_highd_clear_trait, METH_VARARGS|METH_KEYWORDS, "\n" + "Clear a trait landscape.\n" + "\n" + "Parameters:\n" + " - t: number of the trait to be cleared\n" + "\n" + ""}, + { "haploid_highd_clear_traits", _wrap_haploid_highd_clear_traits, METH_O, "Clear all trait landscapes"}, + { "haploid_highd_set_random_trait_epistasis", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_random_trait_epistasis, METH_VARARGS|METH_KEYWORDS, "\n" + "Set a random epistatic term in the genotype-phenotype map. This is meant as an approximation to multi-locus epistasis to which many locus sets contribute. It assigns to each genotype a reprodrucible fitness component drawn from a Gaussian distribution.\n" + "\n" + "Parameters:\n" + " - epistasis_std: standard deviation of the random epistatic terms\n" + " - t: trait number\n" + "\n" + ".. note:: the epistatic terms will be Gaussian distributed around zero with the given standard deviation.\n" + "\n" + ""}, + { "haploid_highd_add_fitness_coefficient", (PyCFunction)(void(*)(void))_wrap_haploid_highd_add_fitness_coefficient, METH_VARARGS|METH_KEYWORDS, "Shortcut for add_trait_coefficient when there is only one trait"}, + { "haploid_highd_clear_fitness", _wrap_haploid_highd_clear_fitness, METH_O, "Shortcut for clear_trait when there is only one trait"}, + { "haploid_highd_set_random_epistasis", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_random_epistasis, METH_VARARGS|METH_KEYWORDS, "Shortcut for set_random_trait_epistasis when there is only one trait"}, + { "haploid_highd_evolve", (PyCFunction)(void(*)(void))_wrap_haploid_highd_evolve, METH_VARARGS|METH_KEYWORDS, "\n" + "Evolve for some generations.\n" + "\n" + "Parameters:\n" + " - gen: number of generations, defaults to one\n" + "\n" + ""}, + { "haploid_highd_bottleneck", (PyCFunction)(void(*)(void))_wrap_haploid_highd_bottleneck, METH_VARARGS|METH_KEYWORDS, "\n" + "Make the population undergo a bottleneck\n" + "\n" + "Parameters:\n" + " - size_of_bottleneck: the number of individuals at the bottleneck\n" + "\n" + ""}, + { "haploid_highd_flip_single_locus", (PyCFunction)(void(*)(void))_wrap_haploid_highd_flip_single_locus, METH_VARARGS|METH_KEYWORDS, "\n" + "\n" + "Take a random clone, flip the allele at the selected locus and create a new clone.\n" + "\n" + "Parameters:\n" + " - locus: locus to flip\n" + "\n" + "Returns:\n" + " - index: index of the new clone with the flipped locus\n" + "\n" + ""}, + { "haploid_highd_calc_stat", _wrap_haploid_highd_calc_stat, METH_O, "Calculate trait and fitness statistics for the population"}, + { "haploid_highd_unique_clones", _wrap_haploid_highd_unique_clones, METH_O, "\n" + "Recompress the clone structure\n" + "\n" + "During its evolution, identical clones might be generated by different routes at\n" + "different times. This function merges any such duplicates into unique clones with\n" + "the size equal to the sum of the sizes of the duplicates.\n" + "\n" + ""}, + { "haploid_highd__get_nonempty_clones", _wrap_haploid_highd__get_nonempty_clones, METH_O, "haploid_highd__get_nonempty_clones(haploid_highd self) -> _intVector"}, + { "haploid_highd_random_clone", _wrap_haploid_highd_random_clone, METH_O, "\n" + "Get a random clone\n" + "\n" + "Returns:\n" + " - clone: index of the random clone\n" + "\n" + ""}, + { "haploid_highd_get_diversity_statistics", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_diversity_statistics, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the mean and variance of the diversity in the population.\n" + "\n" + "Parameters:\n" + " - n_sample: number of individuals to sample at random from the population\n" + "\n" + "Returns:\n" + " - stat: structure with mean and variance of diversity in the population\n" + "\n" + ""}, + { "haploid_highd_get_divergence_statistics", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_divergence_statistics, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the mean and variance of the divergence in the population.\n" + "\n" + "Parameters:\n" + " - n_sample: number of individuals to sample at random from the population\n" + "\n" + "Returns:\n" + " - stat: structure with mean and variance of divergence in the population\n" + "\n" + ""}, + { "haploid_highd_get_allele_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_allele_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of the + allele at the selected locus\n" + "\n" + "Parameters:\n" + " - locus: locus whose frequency of the + allele is to be returned\n" + "\n" + "Returns:\n" + " - frequency: allele frequency in the population\n" + "\n" + ""}, + { "haploid_highd_get_derived_allele_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_derived_allele_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of the derived allele at the selected locus\n" + "\n" + "Parameters:\n" + " - locus: locus whose frequency of the derived allele is to be returned\n" + "\n" + "Returns:\n" + " - frequency: allele frequency in the population\n" + "\n" + ""}, + { "haploid_highd_get_ancestral_state", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_ancestral_state, METH_VARARGS|METH_KEYWORDS, "haploid_highd_get_ancestral_state(haploid_highd self, int l) -> bool"}, + { "haploid_highd_get_pair_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_pair_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the joint frequency of two + alleles\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the joint frequency of the + alleles\n" + "\n" + ""}, + { "haploid_highd_get_chi", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_chi, METH_VARARGS|METH_KEYWORDS, "\n" + "Get :math:`\\chi_i` of an allele\n" + "\n" + "Parameters:\n" + " - locus: locus whose chi is to be computed\n" + "\n" + "Returns:\n" + " - the chi of that allele, :math:`\\chi_i := \\left`, where :math:`s_i \\in \\{\\pm1\\}`.\n" + "\n" + ""}, + { "haploid_highd_get_derived_chi", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_derived_chi, METH_VARARGS|METH_KEYWORDS, "\n" + "Get :math:`\\chi_i` of a derived allele\n" + "\n" + "Parameters:\n" + " - locus: locus whose chi is to be computed\n" + "\n" + "Returns:\n" + " - the chi of that derived allele, :math:`\\chi_i := \\left`, where :math:`s_i \\in \\{\\pm1\\}`.\n" + "\n" + ""}, + { "haploid_highd_get_chi2", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_chi2, METH_VARARGS|METH_KEYWORDS, "\n" + "Get :math:`\\chi_{ij}`\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the linkage disequilibiurm between them, i.e. :math:`\\chi_{ij} := \\left - \\chi_i \\cdot \\chi_j`.\n" + "\n" + ""}, + { "haploid_highd_get_LD", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_LD, METH_VARARGS|METH_KEYWORDS, "\n" + "Get linkage disequilibrium\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the linkage disequilibiurm between them, i.e. :math:`LD := 1 / 4 \\left[\\left - \\chi_i \\cdot \\chi_j\\right]`.\n" + "\n" + ""}, + { "haploid_highd_get_moment", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_moment, METH_VARARGS|METH_KEYWORDS, "\n" + "Get moment of two alleles in the -/+ basis\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the second moment, i.e. :math:`\\left`, where :math:`s_i, s_j \\in \\{-1, 1\\}`.\n" + "\n" + ""}, + { "haploid_highd_get_trait_weight", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_weight, METH_VARARGS|METH_KEYWORDS, "haploid_highd_get_trait_weight(haploid_highd self, int t) -> double"}, + { "haploid_highd_get_fitness", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_fitness, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the fitness of an individual\n" + "\n" + "Parameters:\n" + " - n: index of the clone whose fitness is to be computed\n" + "\n" + "Returns:\n" + " - fitness: fitness value of that clone\n" + "\n" + ""}, + { "haploid_highd_get_clone_size", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_clone_size, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the size of a clone\n" + "\n" + "Parameters:\n" + " - n: index of the clone\n" + "\n" + "Returns:\n" + " - size: size of the selected clone\n" + "\n" + ""}, + { "haploid_highd_get_trait", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait, METH_VARARGS|METH_KEYWORDS, "\n" + "Get a trait of an individual\n" + "\n" + "Parameters:\n" + " - n: index of the clone whose trait is to be computed\n" + " - t: trait to be computed\n" + "\n" + "Returns:\n" + " - trait: value of that trait for that clone\n" + "\n" + ""}, + { "haploid_highd_get_trait_epistasis", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_epistasis, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the epistatic terms of the genotype/phenotype map of the chosen trait.\n" + "\n" + "Parameters:\n" + " - t: trait number\n" + "\n" + "Returns:\n" + " - coefficients: tuple of coefficients, with a value and a tuple of loci\n" + "\n" + ".. note:: This function is designed to work well in conjunction with add_trait_coefficient.\n" + "\n" + ""}, + { "haploid_highd_get_fitness_statistics", _wrap_haploid_highd_get_fitness_statistics, METH_O, "\n" + "Get the mean and variance of the fitness in the population.\n" + "\n" + "Returns:\n" + " - stat: structure with mean and variance of the fitness in the population\n" + "\n" + ""}, + { "haploid_highd_get_trait_statistics", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_statistics, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the mean and variance of a trait in the population.\n" + "\n" + "Parameters:\n" + " - t: number of the trait whose statistics are to be computed\n" + "\n" + "Returns:\n" + " - stat: structure with mean and variance of the trait in the population\n" + "\n" + ""}, + { "haploid_highd_get_trait_covariance", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_covariance, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the covariance of two traits in the population.\n" + "\n" + "Parameters:\n" + " - t1: first trait\n" + " - t2: second trait\n" + "\n" + "Returns:\n" + " - cov: the covariance of the two traits\n" + "\n" + ""}, + { "haploid_highd__update_traits", _wrap_haploid_highd__update_traits, METH_O, "haploid_highd__update_traits(haploid_highd self)"}, + { "haploid_highd__update_fitness", _wrap_haploid_highd__update_fitness, METH_O, "haploid_highd__update_fitness(haploid_highd self)"}, + { "haploid_highd_tree_sample_set", _wrap_haploid_highd_tree_sample_set, METH_VARARGS, "haploid_highd_tree_sample_set(haploid_highd self, int tree_sample)"}, + { "haploid_highd_tree_sample_get", _wrap_haploid_highd_tree_sample_get, METH_O, "haploid_highd_tree_sample_get(haploid_highd self) -> int"}, + { "haploid_highd___str__", _wrap_haploid_highd___str__, METH_O, "x.__str__() <==> str(x)"}, + { "haploid_highd___repr__", _wrap_haploid_highd___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "haploid_highd_get_clone", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_clone, METH_VARARGS|METH_KEYWORDS, "\n" + "Get a single clone\n" + "\n" + "Parameters:\n" + " - n: index of the clone\n" + "\n" + "Returns:\n" + " - clone: the n-th clone in the population\n" + "\n" + ""}, + { "haploid_highd_L_get", _wrap_haploid_highd_L_get, METH_O, "Number of loci (read-only)"}, + { "haploid_highd_number_of_loci_get", _wrap_haploid_highd_number_of_loci_get, METH_O, "Number of loci (read-only)"}, + { "haploid_highd_N_get", _wrap_haploid_highd_N_get, METH_O, "Population size (read-only)"}, + { "haploid_highd_population_size_get", _wrap_haploid_highd_population_size_get, METH_O, "Population size (read-only)"}, + { "haploid_highd_generation_set", _wrap_haploid_highd_generation_set, METH_VARARGS, "Current generation (read-only)"}, + { "haploid_highd_generation_get", _wrap_haploid_highd_generation_get, METH_O, "Current generation (read-only)"}, + { "haploid_highd_number_of_clones_get", _wrap_haploid_highd_number_of_clones_get, METH_O, "Number of non-empty clones (read-only)"}, + { "haploid_highd_number_of_traits_get", _wrap_haploid_highd_number_of_traits_get, METH_O, "Number of traits (read-only)"}, + { "haploid_highd_max_fitness_get", _wrap_haploid_highd_max_fitness_get, METH_O, "Maximal fitness in the population (read-only)"}, + { "haploid_highd_participation_ratio_get", _wrap_haploid_highd_participation_ratio_get, METH_O, "Participation ratio (read-only)"}, + { "haploid_highd__set_trait_weights", (PyCFunction)(void(*)(void))_wrap_haploid_highd__set_trait_weights, METH_VARARGS|METH_KEYWORDS, "haploid_highd__set_trait_weights(haploid_highd self, double * IN_ARRAY1)"}, + { "haploid_highd__get_trait_weights", (PyCFunction)(void(*)(void))_wrap_haploid_highd__get_trait_weights, METH_VARARGS|METH_KEYWORDS, "\n" + "weight of each trait on fitness\n" + "\n" + ".. note:: Fitness is updated automatically when the weights are changed.\n" + "\n" + ""}, + { "haploid_highd_set_genotypes", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_genotypes, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize population with fixed counts for specific genotypes.\n" + "\n" + "Parameters:\n" + " - genotypes: list of genotypes to set. Genotypes are lists of alleles,\n" + " e.g. [[0,0,1,0], [0,1,1,1]] for genotypes 0010 and 0111\n" + " - counts: list of the number at which each of those genotypes it to be present\n" + "\n" + ".. note:: the population size and, if unset, the carrying capacity will be set\n" + " as the sum of the counts.\n" + "\n" + "**Example**: if you want to initialize 200 individuals with genotype 001 and\n" + " 300 individuals with genotype 110, you can use\n" + " ``set_genotypes([[0,0,1], [1,1,0]], [200, 300])``\n" + "\n" + ""}, + { "haploid_highd_set_genotypes_and_ancestral_state", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_genotypes_and_ancestral_state, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize population with fixed counts for specific genotypes.\n" + "\n" + "Parameters:\n" + " - genotypes: list of genotypes to set. Genotypes are lists of alleles,\n" + " e.g. [[0,0,1,0], [0,1,1,1]] for genotypes 0010 and 0111\n" + " - counts: list of the number at which each of those genotypes it to be present\n" + " - ancestral state of the sample, a vector of 0 and 1\n" + ".. note:: the population size and, if unset, the carrying capacity will be set\n" + " as the sum of the counts.\n" + "\n" + "**Example**: if you want to initialize 200 individuals with genotype 001 and\n" + " 300 individuals with genotype 110, you can use\n" + " ``set_genotypes([[0,0,1], [1,1,0]], [200, 300])``\n" + "\n" + ""}, + { "haploid_highd__get_genealogy", _wrap_haploid_highd__get_genealogy, METH_O, "\n" + "Genealogy of the tracked loci.\n" + "\n" + ".. note:: This attribute is read-only.\n" + "\n" + ""}, + { "haploid_highd_get_allele_frequencies", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_allele_frequencies, METH_VARARGS|METH_KEYWORDS, "Get all allele frequencies"}, + { "haploid_highd_get_derived_allele_frequencies", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_derived_allele_frequencies, METH_VARARGS|METH_KEYWORDS, "Get all derived allele frequencies"}, + { "haploid_highd_get_ancestral_states", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_ancestral_states, METH_VARARGS|METH_KEYWORDS, "Get ancestral state of all loci"}, + { "haploid_highd_get_trait_additive", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_additive, METH_VARARGS|METH_KEYWORDS, "\n" + "Get an array with the additive coefficients of all loci of a trait.\n" + "\n" + "Parameters:\n" + " - t: number of the trait\n" + "\n" + "Returns:\n" + " - coefficients: array of additive coefficients for the selected trait\n" + "\n" + ""}, + { "haploid_highd_set_trait_additive", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_trait_additive, METH_VARARGS|METH_KEYWORDS, "\n" + "Set the additive part of a trait\n" + "\n" + "Parameters:\n" + " - coefficients: array of coefficients for the trait (of length L). All previous additive coefficents are erased\n" + " - t: number of the trait to set\n" + "\n" + ""}, + { "haploid_highd_set_fitness_additive", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_fitness_additive, METH_VARARGS|METH_KEYWORDS, "Shortcut for set_trait_additive when there is only one trait"}, + { "haploid_highd_get_genotype", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_genotype, METH_VARARGS|METH_KEYWORDS, "haploid_highd_get_genotype(haploid_highd self, int n) -> boost::dynamic_bitset< >"}, + { "haploid_highd__set_tree_in_genealogy", (PyCFunction)(void(*)(void))_wrap_haploid_highd__set_tree_in_genealogy, METH_VARARGS|METH_KEYWORDS, "haploid_highd__set_tree_in_genealogy(haploid_highd self, int locus, rooted_tree tree)"}, + { "haploid_highd__set_newGeneration_in_genealogy", (PyCFunction)(void(*)(void))_wrap_haploid_highd__set_newGeneration_in_genealogy, METH_VARARGS|METH_KEYWORDS, "haploid_highd__set_newGeneration_in_genealogy(haploid_highd self, int locus, vector_tree_node newGeneration)"}, + { "haploid_highd_swigregister", haploid_highd_swigregister, METH_O, NULL}, + { "haploid_highd_swiginit", haploid_highd_swiginit, METH_VARARGS, NULL}, + { "hivgene_start_set", _wrap_hivgene_start_set, METH_VARARGS, "Initial position of the gene"}, + { "hivgene_start_get", _wrap_hivgene_start_get, METH_O, "Initial position of the gene"}, + { "hivgene_end_set", _wrap_hivgene_end_set, METH_VARARGS, "Final position of the gene"}, + { "hivgene_end_get", _wrap_hivgene_end_get, METH_O, "Final position of the gene"}, + { "hivgene_second_start_set", _wrap_hivgene_second_start_set, METH_VARARGS, "hivgene_second_start_set(hivgene self, unsigned int second_start)"}, + { "hivgene_second_start_get", _wrap_hivgene_second_start_get, METH_O, "hivgene_second_start_get(hivgene self) -> unsigned int"}, + { "hivgene_second_end_set", _wrap_hivgene_second_end_set, METH_VARARGS, "hivgene_second_end_set(hivgene self, unsigned int second_end)"}, + { "hivgene_second_end_get", _wrap_hivgene_second_end_get, METH_O, "hivgene_second_end_get(hivgene self) -> unsigned int"}, + { "new_hivgene", (PyCFunction)(void(*)(void))_wrap_new_hivgene, METH_VARARGS|METH_KEYWORDS, "Structure for an HIV gene."}, + { "hivgene___str__", _wrap_hivgene___str__, METH_O, "x.__str__() <==> str(x)"}, + { "hivgene___repr__", _wrap_hivgene___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "delete_hivgene", _wrap_delete_hivgene, METH_O, "delete_hivgene(hivgene self)"}, + { "hivgene_swigregister", hivgene_swigregister, METH_O, NULL}, + { "hivgene_swiginit", hivgene_swiginit, METH_VARARGS, NULL}, + { "new_hivpopulation", (PyCFunction)(void(*)(void))_wrap_new_hivpopulation, METH_VARARGS|METH_KEYWORDS, "\n" + "Construct a HIV population with certain parameters.\n" + "\n" + "Parameters:\n" + "\n" + " - N number of viral particles\n" + " - rng_seed seed for the random number generator. If this is 0, time(NULL)+getpid() is used.\n" + " - mutation_rate mutation rate in events / generation / site\n" + " - coinfection_rate probability of coinfection of the same cell by two viral particles in events / generation\n" + " - crossover_rate probability of template switching during coinfection in events / site\n" + "\n" + ".. note:: the genome length is 10000 (see HIVGENOME).\n" + "\n" + ""}, + { "delete_hivpopulation", _wrap_delete_hivpopulation, METH_O, "delete_hivpopulation(hivpopulation self)"}, + { "hivpopulation_gag_set", _wrap_hivpopulation_gag_set, METH_VARARGS, "hivpopulation_gag_set(hivpopulation self, hivgene gag)"}, + { "hivpopulation_gag_get", _wrap_hivpopulation_gag_get, METH_O, "hivpopulation_gag_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_pol_set", _wrap_hivpopulation_pol_set, METH_VARARGS, "hivpopulation_pol_set(hivpopulation self, hivgene pol)"}, + { "hivpopulation_pol_get", _wrap_hivpopulation_pol_get, METH_O, "hivpopulation_pol_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_env_set", _wrap_hivpopulation_env_set, METH_VARARGS, "hivpopulation_env_set(hivpopulation self, hivgene env)"}, + { "hivpopulation_env_get", _wrap_hivpopulation_env_get, METH_O, "hivpopulation_env_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_nef_set", _wrap_hivpopulation_nef_set, METH_VARARGS, "hivpopulation_nef_set(hivpopulation self, hivgene nef)"}, + { "hivpopulation_nef_get", _wrap_hivpopulation_nef_get, METH_O, "hivpopulation_nef_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_vif_set", _wrap_hivpopulation_vif_set, METH_VARARGS, "hivpopulation_vif_set(hivpopulation self, hivgene vif)"}, + { "hivpopulation_vif_get", _wrap_hivpopulation_vif_get, METH_O, "hivpopulation_vif_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_vpu_set", _wrap_hivpopulation_vpu_set, METH_VARARGS, "hivpopulation_vpu_set(hivpopulation self, hivgene vpu)"}, + { "hivpopulation_vpu_get", _wrap_hivpopulation_vpu_get, METH_O, "hivpopulation_vpu_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_vpr_set", _wrap_hivpopulation_vpr_set, METH_VARARGS, "hivpopulation_vpr_set(hivpopulation self, hivgene vpr)"}, + { "hivpopulation_vpr_get", _wrap_hivpopulation_vpr_get, METH_O, "hivpopulation_vpr_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_tat_set", _wrap_hivpopulation_tat_set, METH_VARARGS, "hivpopulation_tat_set(hivpopulation self, hivgene tat)"}, + { "hivpopulation_tat_get", _wrap_hivpopulation_tat_get, METH_O, "hivpopulation_tat_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_rev_set", _wrap_hivpopulation_rev_set, METH_VARARGS, "hivpopulation_rev_set(hivpopulation self, hivgene rev)"}, + { "hivpopulation_rev_get", _wrap_hivpopulation_rev_get, METH_O, "hivpopulation_rev_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_read_replication_coefficients", (PyCFunction)(void(*)(void))_wrap_hivpopulation_read_replication_coefficients, METH_VARARGS|METH_KEYWORDS, "\n" + "Read replication coefficients from a text file\n" + "\n" + "Parameters:\n" + " - filename: string with the name of the file to read the coefficients from\n" + "\n" + ""}, + { "hivpopulation_read_resistance_coefficients", (PyCFunction)(void(*)(void))_wrap_hivpopulation_read_resistance_coefficients, METH_VARARGS|METH_KEYWORDS, "\n" + "Read resistance coefficients from a text file\n" + "\n" + "Parameters:\n" + " - filename: string with the name of the file to read the coefficients from\n" + "\n" + ""}, + { "hivpopulation_write_genotypes", (PyCFunction)(void(*)(void))_wrap_hivpopulation_write_genotypes, METH_VARARGS|METH_KEYWORDS, "\n" + "Store random genotypes into a plain text file.\n" + "\n" + "Parameters:\n" + " - filename: string with the name of the file to store the genotype into\n" + " - sample_size: how many random genotypes to store\n" + " - gt_label: common fasta label for the genotypes (e.g. 'HIV-sim')\n" + " - start: if only a portion of the genome is to be stored, start from this position\n" + " - length: store a chunk from ``start`` to this length\n" + "\n" + ""}, + { "hivpopulation___str__", _wrap_hivpopulation___str__, METH_O, "x.__str__() <==> str(x)"}, + { "hivpopulation___repr__", _wrap_hivpopulation___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "hivpopulation_treatment_set", _wrap_hivpopulation_treatment_set, METH_VARARGS, "\n" + "Treatment weight (between 0 and 1)\n" + "\n" + ".. note:: this variable controls how important is either of the two phenotypic\n" + " traits, replication and resistance. Their contribution to fitness is\n" + " always linear (in this implementation).\n" + "\n" + ""}, + { "hivpopulation_treatment_get", _wrap_hivpopulation_treatment_get, METH_O, "\n" + "Treatment weight (between 0 and 1)\n" + "\n" + ".. note:: this variable controls how important is either of the two phenotypic\n" + " traits, replication and resistance. Their contribution to fitness is\n" + " always linear (in this implementation).\n" + "\n" + ""}, + { "hivpopulation_swigregister", hivpopulation_swigregister, METH_O, NULL}, + { "hivpopulation_swiginit", hivpopulation_swiginit, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + +static PyMethodDef SwigMethods_proxydocs[] = { + { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL}, + { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL}, + { "delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_O, NULL}, + { "SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_O, NULL}, + { "SwigPyIterator_incr", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_incr, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator_decr", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_decr, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator_distance", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_distance, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator_equal", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_equal, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_O, NULL}, + { "SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_O, NULL}, + { "SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_O, NULL}, + { "SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_O, NULL}, + { "SwigPyIterator_advance", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator_advance, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___eq__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___eq__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___ne__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___ne__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___iadd__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___iadd__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___isub__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___isub__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___add__", (PyCFunction)(void(*)(void))_wrap_SwigPyIterator___add__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL}, + { "SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_O, NULL}, + { "_intVector_iterator", _wrap__intVector_iterator, METH_O, NULL}, + { "_intVector___nonzero__", _wrap__intVector___nonzero__, METH_O, NULL}, + { "_intVector___bool__", _wrap__intVector___bool__, METH_O, NULL}, + { "_intVector___len__", _wrap__intVector___len__, METH_O, NULL}, + { "_intVector___getslice__", (PyCFunction)(void(*)(void))_wrap__intVector___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector___setslice__", _wrap__intVector___setslice__, METH_VARARGS, NULL}, + { "_intVector___delslice__", (PyCFunction)(void(*)(void))_wrap__intVector___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector___delitem__", _wrap__intVector___delitem__, METH_VARARGS, NULL}, + { "_intVector___getitem__", _wrap__intVector___getitem__, METH_VARARGS, NULL}, + { "_intVector___setitem__", _wrap__intVector___setitem__, METH_VARARGS, NULL}, + { "_intVector_pop", _wrap__intVector_pop, METH_O, NULL}, + { "_intVector_append", (PyCFunction)(void(*)(void))_wrap__intVector_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_empty", _wrap__intVector_empty, METH_O, NULL}, + { "_intVector_size", _wrap__intVector_size, METH_O, NULL}, + { "_intVector_swap", (PyCFunction)(void(*)(void))_wrap__intVector_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_begin", _wrap__intVector_begin, METH_O, NULL}, + { "_intVector_end", _wrap__intVector_end, METH_O, NULL}, + { "_intVector_rbegin", _wrap__intVector_rbegin, METH_O, NULL}, + { "_intVector_rend", _wrap__intVector_rend, METH_O, NULL}, + { "_intVector_clear", _wrap__intVector_clear, METH_O, NULL}, + { "_intVector_get_allocator", _wrap__intVector_get_allocator, METH_O, NULL}, + { "_intVector_pop_back", _wrap__intVector_pop_back, METH_O, NULL}, + { "_intVector_erase", _wrap__intVector_erase, METH_VARARGS, NULL}, + { "new__intVector", _wrap_new__intVector, METH_VARARGS, NULL}, + { "_intVector_push_back", (PyCFunction)(void(*)(void))_wrap__intVector_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_front", _wrap__intVector_front, METH_O, NULL}, + { "_intVector_back", _wrap__intVector_back, METH_O, NULL}, + { "_intVector_assign", (PyCFunction)(void(*)(void))_wrap__intVector_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_resize", _wrap__intVector_resize, METH_VARARGS, NULL}, + { "_intVector_insert", _wrap__intVector_insert, METH_VARARGS, NULL}, + { "_intVector_reserve", (PyCFunction)(void(*)(void))_wrap__intVector_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "_intVector_capacity", _wrap__intVector_capacity, METH_O, NULL}, + { "delete__intVector", _wrap_delete__intVector, METH_O, "delete__intVector(_intVector self)"}, + { "_intVector_swigregister", _intVector_swigregister, METH_O, NULL}, + { "_intVector_swiginit", _intVector_swiginit, METH_VARARGS, NULL}, + { "vector_tree_step_iterator", _wrap_vector_tree_step_iterator, METH_O, NULL}, + { "vector_tree_step___nonzero__", _wrap_vector_tree_step___nonzero__, METH_O, NULL}, + { "vector_tree_step___bool__", _wrap_vector_tree_step___bool__, METH_O, NULL}, + { "vector_tree_step___len__", _wrap_vector_tree_step___len__, METH_O, NULL}, + { "vector_tree_step___getslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_step___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step___setslice__", _wrap_vector_tree_step___setslice__, METH_VARARGS, NULL}, + { "vector_tree_step___delslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_step___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step___delitem__", _wrap_vector_tree_step___delitem__, METH_VARARGS, NULL}, + { "vector_tree_step___getitem__", _wrap_vector_tree_step___getitem__, METH_VARARGS, NULL}, + { "vector_tree_step___setitem__", _wrap_vector_tree_step___setitem__, METH_VARARGS, NULL}, + { "vector_tree_step_pop", _wrap_vector_tree_step_pop, METH_O, NULL}, + { "vector_tree_step_append", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_empty", _wrap_vector_tree_step_empty, METH_O, NULL}, + { "vector_tree_step_size", _wrap_vector_tree_step_size, METH_O, NULL}, + { "vector_tree_step_swap", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_begin", _wrap_vector_tree_step_begin, METH_O, NULL}, + { "vector_tree_step_end", _wrap_vector_tree_step_end, METH_O, NULL}, + { "vector_tree_step_rbegin", _wrap_vector_tree_step_rbegin, METH_O, NULL}, + { "vector_tree_step_rend", _wrap_vector_tree_step_rend, METH_O, NULL}, + { "vector_tree_step_clear", _wrap_vector_tree_step_clear, METH_O, NULL}, + { "vector_tree_step_get_allocator", _wrap_vector_tree_step_get_allocator, METH_O, NULL}, + { "vector_tree_step_pop_back", _wrap_vector_tree_step_pop_back, METH_O, NULL}, + { "vector_tree_step_erase", _wrap_vector_tree_step_erase, METH_VARARGS, NULL}, + { "new_vector_tree_step", _wrap_new_vector_tree_step, METH_VARARGS, NULL}, + { "vector_tree_step_push_back", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_front", _wrap_vector_tree_step_front, METH_O, NULL}, + { "vector_tree_step_back", _wrap_vector_tree_step_back, METH_O, NULL}, + { "vector_tree_step_assign", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_resize", _wrap_vector_tree_step_resize, METH_VARARGS, NULL}, + { "vector_tree_step_insert", _wrap_vector_tree_step_insert, METH_VARARGS, NULL}, + { "vector_tree_step_reserve", (PyCFunction)(void(*)(void))_wrap_vector_tree_step_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_step_capacity", _wrap_vector_tree_step_capacity, METH_O, NULL}, + { "delete_vector_tree_step", _wrap_delete_vector_tree_step, METH_O, "delete_vector_tree_step(vector_tree_step self)"}, + { "vector_tree_step_swigregister", vector_tree_step_swigregister, METH_O, NULL}, + { "vector_tree_step_swiginit", vector_tree_step_swiginit, METH_VARARGS, NULL}, + { "vector_tree_key_iterator", _wrap_vector_tree_key_iterator, METH_O, NULL}, + { "vector_tree_key___nonzero__", _wrap_vector_tree_key___nonzero__, METH_O, NULL}, + { "vector_tree_key___bool__", _wrap_vector_tree_key___bool__, METH_O, NULL}, + { "vector_tree_key___len__", _wrap_vector_tree_key___len__, METH_O, NULL}, + { "vector_tree_key___getslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_key___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key___setslice__", _wrap_vector_tree_key___setslice__, METH_VARARGS, NULL}, + { "vector_tree_key___delslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_key___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key___delitem__", _wrap_vector_tree_key___delitem__, METH_VARARGS, NULL}, + { "vector_tree_key___getitem__", _wrap_vector_tree_key___getitem__, METH_VARARGS, NULL}, + { "vector_tree_key___setitem__", _wrap_vector_tree_key___setitem__, METH_VARARGS, NULL}, + { "vector_tree_key_pop", _wrap_vector_tree_key_pop, METH_O, NULL}, + { "vector_tree_key_append", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_empty", _wrap_vector_tree_key_empty, METH_O, NULL}, + { "vector_tree_key_size", _wrap_vector_tree_key_size, METH_O, NULL}, + { "vector_tree_key_swap", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_begin", _wrap_vector_tree_key_begin, METH_O, NULL}, + { "vector_tree_key_end", _wrap_vector_tree_key_end, METH_O, NULL}, + { "vector_tree_key_rbegin", _wrap_vector_tree_key_rbegin, METH_O, NULL}, + { "vector_tree_key_rend", _wrap_vector_tree_key_rend, METH_O, NULL}, + { "vector_tree_key_clear", _wrap_vector_tree_key_clear, METH_O, NULL}, + { "vector_tree_key_get_allocator", _wrap_vector_tree_key_get_allocator, METH_O, NULL}, + { "vector_tree_key_pop_back", _wrap_vector_tree_key_pop_back, METH_O, NULL}, + { "vector_tree_key_erase", _wrap_vector_tree_key_erase, METH_VARARGS, NULL}, + { "new_vector_tree_key", _wrap_new_vector_tree_key, METH_VARARGS, NULL}, + { "vector_tree_key_push_back", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_front", _wrap_vector_tree_key_front, METH_O, NULL}, + { "vector_tree_key_back", _wrap_vector_tree_key_back, METH_O, NULL}, + { "vector_tree_key_assign", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_resize", _wrap_vector_tree_key_resize, METH_VARARGS, NULL}, + { "vector_tree_key_insert", _wrap_vector_tree_key_insert, METH_VARARGS, NULL}, + { "vector_tree_key_reserve", (PyCFunction)(void(*)(void))_wrap_vector_tree_key_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_key_capacity", _wrap_vector_tree_key_capacity, METH_O, NULL}, + { "delete_vector_tree_key", _wrap_delete_vector_tree_key, METH_O, "delete_vector_tree_key(vector_tree_key self)"}, + { "vector_tree_key_swigregister", vector_tree_key_swigregister, METH_O, NULL}, + { "vector_tree_key_swiginit", vector_tree_key_swiginit, METH_VARARGS, NULL}, + { "list_tree_key_iterator", _wrap_list_tree_key_iterator, METH_O, NULL}, + { "list_tree_key___nonzero__", _wrap_list_tree_key___nonzero__, METH_O, NULL}, + { "list_tree_key___bool__", _wrap_list_tree_key___bool__, METH_O, NULL}, + { "list_tree_key___len__", _wrap_list_tree_key___len__, METH_O, NULL}, + { "list_tree_key___getslice__", (PyCFunction)(void(*)(void))_wrap_list_tree_key___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key___setslice__", _wrap_list_tree_key___setslice__, METH_VARARGS, NULL}, + { "list_tree_key___delslice__", (PyCFunction)(void(*)(void))_wrap_list_tree_key___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key___delitem__", _wrap_list_tree_key___delitem__, METH_VARARGS, NULL}, + { "list_tree_key___getitem__", _wrap_list_tree_key___getitem__, METH_VARARGS, NULL}, + { "list_tree_key___setitem__", _wrap_list_tree_key___setitem__, METH_VARARGS, NULL}, + { "list_tree_key_pop", _wrap_list_tree_key_pop, METH_O, NULL}, + { "list_tree_key_append", (PyCFunction)(void(*)(void))_wrap_list_tree_key_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_empty", _wrap_list_tree_key_empty, METH_O, NULL}, + { "list_tree_key_size", _wrap_list_tree_key_size, METH_O, NULL}, + { "list_tree_key_swap", (PyCFunction)(void(*)(void))_wrap_list_tree_key_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_begin", _wrap_list_tree_key_begin, METH_O, NULL}, + { "list_tree_key_end", _wrap_list_tree_key_end, METH_O, NULL}, + { "list_tree_key_rbegin", _wrap_list_tree_key_rbegin, METH_O, NULL}, + { "list_tree_key_rend", _wrap_list_tree_key_rend, METH_O, NULL}, + { "list_tree_key_clear", _wrap_list_tree_key_clear, METH_O, NULL}, + { "list_tree_key_get_allocator", _wrap_list_tree_key_get_allocator, METH_O, NULL}, + { "list_tree_key_pop_back", _wrap_list_tree_key_pop_back, METH_O, NULL}, + { "list_tree_key_erase", _wrap_list_tree_key_erase, METH_VARARGS, NULL}, + { "new_list_tree_key", _wrap_new_list_tree_key, METH_VARARGS, NULL}, + { "list_tree_key_push_back", (PyCFunction)(void(*)(void))_wrap_list_tree_key_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_front", _wrap_list_tree_key_front, METH_O, NULL}, + { "list_tree_key_back", _wrap_list_tree_key_back, METH_O, NULL}, + { "list_tree_key_assign", (PyCFunction)(void(*)(void))_wrap_list_tree_key_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_resize", _wrap_list_tree_key_resize, METH_VARARGS, NULL}, + { "list_tree_key_insert", _wrap_list_tree_key_insert, METH_VARARGS, NULL}, + { "list_tree_key_pop_front", _wrap_list_tree_key_pop_front, METH_O, NULL}, + { "list_tree_key_push_front", (PyCFunction)(void(*)(void))_wrap_list_tree_key_push_front, METH_VARARGS|METH_KEYWORDS, NULL}, + { "list_tree_key_reverse", _wrap_list_tree_key_reverse, METH_O, NULL}, + { "delete_list_tree_key", _wrap_delete_list_tree_key, METH_O, "delete_list_tree_key(list_tree_key self)"}, + { "list_tree_key_swigregister", list_tree_key_swigregister, METH_O, NULL}, + { "list_tree_key_swiginit", list_tree_key_swiginit, METH_VARARGS, NULL}, + { "map_key_edge_iterator", _wrap_map_key_edge_iterator, METH_O, NULL}, + { "map_key_edge___nonzero__", _wrap_map_key_edge___nonzero__, METH_O, NULL}, + { "map_key_edge___bool__", _wrap_map_key_edge___bool__, METH_O, NULL}, + { "map_key_edge___len__", _wrap_map_key_edge___len__, METH_O, NULL}, + { "map_key_edge___getitem__", (PyCFunction)(void(*)(void))_wrap_map_key_edge___getitem__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge___delitem__", (PyCFunction)(void(*)(void))_wrap_map_key_edge___delitem__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_has_key", (PyCFunction)(void(*)(void))_wrap_map_key_edge_has_key, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_keys", _wrap_map_key_edge_keys, METH_O, NULL}, + { "map_key_edge_values", _wrap_map_key_edge_values, METH_O, NULL}, + { "map_key_edge_items", _wrap_map_key_edge_items, METH_O, NULL}, + { "map_key_edge___contains__", (PyCFunction)(void(*)(void))_wrap_map_key_edge___contains__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_key_iterator", _wrap_map_key_edge_key_iterator, METH_O, NULL}, + { "map_key_edge_value_iterator", _wrap_map_key_edge_value_iterator, METH_O, NULL}, + { "map_key_edge___setitem__", _wrap_map_key_edge___setitem__, METH_VARARGS, NULL}, + { "map_key_edge_asdict", _wrap_map_key_edge_asdict, METH_O, NULL}, + { "new_map_key_edge", _wrap_new_map_key_edge, METH_VARARGS, NULL}, + { "map_key_edge_empty", _wrap_map_key_edge_empty, METH_O, NULL}, + { "map_key_edge_size", _wrap_map_key_edge_size, METH_O, NULL}, + { "map_key_edge_swap", (PyCFunction)(void(*)(void))_wrap_map_key_edge_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_begin", _wrap_map_key_edge_begin, METH_O, NULL}, + { "map_key_edge_end", _wrap_map_key_edge_end, METH_O, NULL}, + { "map_key_edge_rbegin", _wrap_map_key_edge_rbegin, METH_O, NULL}, + { "map_key_edge_rend", _wrap_map_key_edge_rend, METH_O, NULL}, + { "map_key_edge_clear", _wrap_map_key_edge_clear, METH_O, NULL}, + { "map_key_edge_get_allocator", _wrap_map_key_edge_get_allocator, METH_O, NULL}, + { "map_key_edge_count", (PyCFunction)(void(*)(void))_wrap_map_key_edge_count, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_erase", _wrap_map_key_edge_erase, METH_VARARGS, NULL}, + { "map_key_edge_find", (PyCFunction)(void(*)(void))_wrap_map_key_edge_find, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_lower_bound", (PyCFunction)(void(*)(void))_wrap_map_key_edge_lower_bound, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_edge_upper_bound", (PyCFunction)(void(*)(void))_wrap_map_key_edge_upper_bound, METH_VARARGS|METH_KEYWORDS, NULL}, + { "delete_map_key_edge", _wrap_delete_map_key_edge, METH_O, "delete_map_key_edge(map_key_edge self)"}, + { "map_key_edge_swigregister", map_key_edge_swigregister, METH_O, NULL}, + { "map_key_edge_swiginit", map_key_edge_swiginit, METH_VARARGS, NULL}, + { "map_key_node_iterator", _wrap_map_key_node_iterator, METH_O, NULL}, + { "map_key_node___nonzero__", _wrap_map_key_node___nonzero__, METH_O, NULL}, + { "map_key_node___bool__", _wrap_map_key_node___bool__, METH_O, NULL}, + { "map_key_node___len__", _wrap_map_key_node___len__, METH_O, NULL}, + { "map_key_node___getitem__", (PyCFunction)(void(*)(void))_wrap_map_key_node___getitem__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node___delitem__", (PyCFunction)(void(*)(void))_wrap_map_key_node___delitem__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_has_key", (PyCFunction)(void(*)(void))_wrap_map_key_node_has_key, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_keys", _wrap_map_key_node_keys, METH_O, NULL}, + { "map_key_node_values", _wrap_map_key_node_values, METH_O, NULL}, + { "map_key_node_items", _wrap_map_key_node_items, METH_O, NULL}, + { "map_key_node___contains__", (PyCFunction)(void(*)(void))_wrap_map_key_node___contains__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_key_iterator", _wrap_map_key_node_key_iterator, METH_O, NULL}, + { "map_key_node_value_iterator", _wrap_map_key_node_value_iterator, METH_O, NULL}, + { "map_key_node___setitem__", _wrap_map_key_node___setitem__, METH_VARARGS, NULL}, + { "map_key_node_asdict", _wrap_map_key_node_asdict, METH_O, NULL}, + { "new_map_key_node", _wrap_new_map_key_node, METH_VARARGS, NULL}, + { "map_key_node_empty", _wrap_map_key_node_empty, METH_O, NULL}, + { "map_key_node_size", _wrap_map_key_node_size, METH_O, NULL}, + { "map_key_node_swap", (PyCFunction)(void(*)(void))_wrap_map_key_node_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_begin", _wrap_map_key_node_begin, METH_O, NULL}, + { "map_key_node_end", _wrap_map_key_node_end, METH_O, NULL}, + { "map_key_node_rbegin", _wrap_map_key_node_rbegin, METH_O, NULL}, + { "map_key_node_rend", _wrap_map_key_node_rend, METH_O, NULL}, + { "map_key_node_clear", _wrap_map_key_node_clear, METH_O, NULL}, + { "map_key_node_get_allocator", _wrap_map_key_node_get_allocator, METH_O, NULL}, + { "map_key_node_count", (PyCFunction)(void(*)(void))_wrap_map_key_node_count, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_erase", _wrap_map_key_node_erase, METH_VARARGS, NULL}, + { "map_key_node_find", (PyCFunction)(void(*)(void))_wrap_map_key_node_find, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_lower_bound", (PyCFunction)(void(*)(void))_wrap_map_key_node_lower_bound, METH_VARARGS|METH_KEYWORDS, NULL}, + { "map_key_node_upper_bound", (PyCFunction)(void(*)(void))_wrap_map_key_node_upper_bound, METH_VARARGS|METH_KEYWORDS, NULL}, + { "delete_map_key_node", _wrap_delete_map_key_node, METH_O, "delete_map_key_node(map_key_node self)"}, + { "map_key_node_swigregister", map_key_node_swigregister, METH_O, NULL}, + { "map_key_node_swiginit", map_key_node_swiginit, METH_VARARGS, NULL}, + { "vector_polymorphism_iterator", _wrap_vector_polymorphism_iterator, METH_O, NULL}, + { "vector_polymorphism___nonzero__", _wrap_vector_polymorphism___nonzero__, METH_O, NULL}, + { "vector_polymorphism___bool__", _wrap_vector_polymorphism___bool__, METH_O, NULL}, + { "vector_polymorphism___len__", _wrap_vector_polymorphism___len__, METH_O, NULL}, + { "vector_polymorphism___getslice__", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism___setslice__", _wrap_vector_polymorphism___setslice__, METH_VARARGS, NULL}, + { "vector_polymorphism___delslice__", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism___delitem__", _wrap_vector_polymorphism___delitem__, METH_VARARGS, NULL}, + { "vector_polymorphism___getitem__", _wrap_vector_polymorphism___getitem__, METH_VARARGS, NULL}, + { "vector_polymorphism___setitem__", _wrap_vector_polymorphism___setitem__, METH_VARARGS, NULL}, + { "vector_polymorphism_pop", _wrap_vector_polymorphism_pop, METH_O, NULL}, + { "vector_polymorphism_append", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_empty", _wrap_vector_polymorphism_empty, METH_O, NULL}, + { "vector_polymorphism_size", _wrap_vector_polymorphism_size, METH_O, NULL}, + { "vector_polymorphism_swap", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_begin", _wrap_vector_polymorphism_begin, METH_O, NULL}, + { "vector_polymorphism_end", _wrap_vector_polymorphism_end, METH_O, NULL}, + { "vector_polymorphism_rbegin", _wrap_vector_polymorphism_rbegin, METH_O, NULL}, + { "vector_polymorphism_rend", _wrap_vector_polymorphism_rend, METH_O, NULL}, + { "vector_polymorphism_clear", _wrap_vector_polymorphism_clear, METH_O, NULL}, + { "vector_polymorphism_get_allocator", _wrap_vector_polymorphism_get_allocator, METH_O, NULL}, + { "vector_polymorphism_pop_back", _wrap_vector_polymorphism_pop_back, METH_O, NULL}, + { "vector_polymorphism_erase", _wrap_vector_polymorphism_erase, METH_VARARGS, NULL}, + { "new_vector_polymorphism", _wrap_new_vector_polymorphism, METH_VARARGS, NULL}, + { "vector_polymorphism_push_back", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_front", _wrap_vector_polymorphism_front, METH_O, NULL}, + { "vector_polymorphism_back", _wrap_vector_polymorphism_back, METH_O, NULL}, + { "vector_polymorphism_assign", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_resize", _wrap_vector_polymorphism_resize, METH_VARARGS, NULL}, + { "vector_polymorphism_insert", _wrap_vector_polymorphism_insert, METH_VARARGS, NULL}, + { "vector_polymorphism_reserve", (PyCFunction)(void(*)(void))_wrap_vector_polymorphism_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_polymorphism_capacity", _wrap_vector_polymorphism_capacity, METH_O, NULL}, + { "delete_vector_polymorphism", _wrap_delete_vector_polymorphism, METH_O, "delete_vector_polymorphism(vector_polymorphism self)"}, + { "vector_polymorphism_swigregister", vector_polymorphism_swigregister, METH_O, NULL}, + { "vector_polymorphism_swiginit", vector_polymorphism_swiginit, METH_VARARGS, NULL}, + { "vector_tree_node_iterator", _wrap_vector_tree_node_iterator, METH_O, NULL}, + { "vector_tree_node___nonzero__", _wrap_vector_tree_node___nonzero__, METH_O, NULL}, + { "vector_tree_node___bool__", _wrap_vector_tree_node___bool__, METH_O, NULL}, + { "vector_tree_node___len__", _wrap_vector_tree_node___len__, METH_O, NULL}, + { "vector_tree_node___getslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_node___getslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node___setslice__", _wrap_vector_tree_node___setslice__, METH_VARARGS, NULL}, + { "vector_tree_node___delslice__", (PyCFunction)(void(*)(void))_wrap_vector_tree_node___delslice__, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node___delitem__", _wrap_vector_tree_node___delitem__, METH_VARARGS, NULL}, + { "vector_tree_node___getitem__", _wrap_vector_tree_node___getitem__, METH_VARARGS, NULL}, + { "vector_tree_node___setitem__", _wrap_vector_tree_node___setitem__, METH_VARARGS, NULL}, + { "vector_tree_node_pop", _wrap_vector_tree_node_pop, METH_O, NULL}, + { "vector_tree_node_append", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_append, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_empty", _wrap_vector_tree_node_empty, METH_O, NULL}, + { "vector_tree_node_size", _wrap_vector_tree_node_size, METH_O, NULL}, + { "vector_tree_node_swap", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_swap, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_begin", _wrap_vector_tree_node_begin, METH_O, NULL}, + { "vector_tree_node_end", _wrap_vector_tree_node_end, METH_O, NULL}, + { "vector_tree_node_rbegin", _wrap_vector_tree_node_rbegin, METH_O, NULL}, + { "vector_tree_node_rend", _wrap_vector_tree_node_rend, METH_O, NULL}, + { "vector_tree_node_clear", _wrap_vector_tree_node_clear, METH_O, NULL}, + { "vector_tree_node_get_allocator", _wrap_vector_tree_node_get_allocator, METH_O, NULL}, + { "vector_tree_node_pop_back", _wrap_vector_tree_node_pop_back, METH_O, NULL}, + { "vector_tree_node_erase", _wrap_vector_tree_node_erase, METH_VARARGS, NULL}, + { "new_vector_tree_node", _wrap_new_vector_tree_node, METH_VARARGS, NULL}, + { "vector_tree_node_push_back", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_push_back, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_front", _wrap_vector_tree_node_front, METH_O, NULL}, + { "vector_tree_node_back", _wrap_vector_tree_node_back, METH_O, NULL}, + { "vector_tree_node_assign", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_assign, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_resize", _wrap_vector_tree_node_resize, METH_VARARGS, NULL}, + { "vector_tree_node_insert", _wrap_vector_tree_node_insert, METH_VARARGS, NULL}, + { "vector_tree_node_reserve", (PyCFunction)(void(*)(void))_wrap_vector_tree_node_reserve, METH_VARARGS|METH_KEYWORDS, NULL}, + { "vector_tree_node_capacity", _wrap_vector_tree_node_capacity, METH_O, NULL}, + { "delete_vector_tree_node", _wrap_delete_vector_tree_node, METH_O, "delete_vector_tree_node(vector_tree_node self)"}, + { "vector_tree_node_swigregister", vector_tree_node_swigregister, METH_O, NULL}, + { "vector_tree_node_swiginit", vector_tree_node_swiginit, METH_VARARGS, NULL}, + { "index_value_pair_index_set", _wrap_index_value_pair_index_set, METH_VARARGS, "Index"}, + { "index_value_pair_index_get", _wrap_index_value_pair_index_get, METH_O, "Index"}, + { "index_value_pair_val_set", _wrap_index_value_pair_val_set, METH_VARARGS, "Value"}, + { "index_value_pair_val_get", _wrap_index_value_pair_val_get, METH_O, "Value"}, + { "new_index_value_pair", (PyCFunction)(void(*)(void))_wrap_new_index_value_pair, METH_VARARGS|METH_KEYWORDS, "Pair of an index and a value"}, + { "index_value_pair___str__", _wrap_index_value_pair___str__, METH_O, "__str__(index_value_pair self) -> char const *"}, + { "index_value_pair___repr__", _wrap_index_value_pair___repr__, METH_O, "__repr__(index_value_pair self) -> char const *"}, + { "delete_index_value_pair", _wrap_delete_index_value_pair, METH_O, "delete_index_value_pair(index_value_pair self)"}, + { "index_value_pair_swigregister", index_value_pair_swigregister, METH_O, NULL}, + { "index_value_pair_swiginit", index_value_pair_swiginit, METH_VARARGS, NULL}, + { "genotype_value_pair_genotype_set", _wrap_genotype_value_pair_genotype_set, METH_VARARGS, "Genotype"}, + { "genotype_value_pair_genotype_get", _wrap_genotype_value_pair_genotype_get, METH_O, "Genotype"}, + { "genotype_value_pair_val_set", _wrap_genotype_value_pair_val_set, METH_VARARGS, "Value"}, + { "genotype_value_pair_val_get", _wrap_genotype_value_pair_val_get, METH_O, "Value"}, + { "new_genotype_value_pair", (PyCFunction)(void(*)(void))_wrap_new_genotype_value_pair, METH_VARARGS|METH_KEYWORDS, "Pair of a genotype and a value"}, + { "genotype_value_pair___str__", _wrap_genotype_value_pair___str__, METH_O, "__str__(genotype_value_pair self) -> char const *"}, + { "genotype_value_pair___repr__", _wrap_genotype_value_pair___repr__, METH_O, "__repr__(genotype_value_pair self) -> char const *"}, + { "delete_genotype_value_pair", _wrap_delete_genotype_value_pair, METH_O, "delete_genotype_value_pair(genotype_value_pair self)"}, + { "genotype_value_pair_swigregister", genotype_value_pair_swigregister, METH_O, NULL}, + { "genotype_value_pair_swiginit", genotype_value_pair_swiginit, METH_VARARGS, NULL}, + { "stat_mean_set", _wrap_stat_mean_set, METH_VARARGS, "Mean"}, + { "stat_mean_get", _wrap_stat_mean_get, METH_O, "Mean"}, + { "stat_variance_set", _wrap_stat_variance_set, METH_VARARGS, "Variance"}, + { "stat_variance_get", _wrap_stat_variance_get, METH_O, "Variance"}, + { "new_stat", (PyCFunction)(void(*)(void))_wrap_new_stat, METH_VARARGS|METH_KEYWORDS, "Mean and variance of a statistical distribution"}, + { "stat___str__", _wrap_stat___str__, METH_O, "__str__(stat self) -> char const *"}, + { "stat___repr__", _wrap_stat___repr__, METH_O, "__repr__(stat self) -> char const *"}, + { "delete_stat", _wrap_delete_stat, METH_O, "delete_stat(stat self)"}, + { "stat_swigregister", stat_swigregister, METH_O, NULL}, + { "stat_swiginit", stat_swiginit, METH_VARARGS, NULL}, + { "new_haploid_lowd", (PyCFunction)(void(*)(void))_wrap_new_haploid_lowd, METH_VARARGS|METH_KEYWORDS, "\n" + "Construct a low-dimensional population with certain parameters.\n" + "\n" + "Parameters:\n" + " - L : number of loci (at least 1)\n" + " - rng_seed : seed for the random number generator\n" + "\n" + ""}, + { "delete_haploid_lowd", _wrap_delete_haploid_lowd, METH_O, "delete_haploid_lowd(haploid_lowd self)"}, + { "haploid_lowd_carrying_capacity_set", _wrap_haploid_lowd_carrying_capacity_set, METH_VARARGS, "current carrying capacity of the environment"}, + { "haploid_lowd_carrying_capacity_get", _wrap_haploid_lowd_carrying_capacity_get, METH_O, "current carrying capacity of the environment"}, + { "haploid_lowd_outcrossing_rate_set", _wrap_haploid_lowd_outcrossing_rate_set, METH_VARARGS, "outcrossing rate (probability of sexual reproduction per generation)"}, + { "haploid_lowd_outcrossing_rate_get", _wrap_haploid_lowd_outcrossing_rate_get, METH_O, "outcrossing rate (probability of sexual reproduction per generation)"}, + { "haploid_lowd_circular_set", _wrap_haploid_lowd_circular_set, METH_VARARGS, "is the genome circular?"}, + { "haploid_lowd_circular_get", _wrap_haploid_lowd_circular_get, METH_O, "is the genome circular?"}, + { "haploid_lowd__get_mutation_rate", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__get_mutation_rate, METH_VARARGS|METH_KEYWORDS, "_get_mutation_rate(haploid_lowd self, int locus, int direction) -> double"}, + { "haploid_lowd__get_recombination_model", _wrap_haploid_lowd__get_recombination_model, METH_O, "\n" + "Model of recombination to use\n" + "\n" + "Available values:\n" + "\n" + " - FFPopSim.FREE_RECOMBINATION: free shuffling between parents\n" + " - FFPopSim.CROSSOVERS: block recombination with crossover probability\n" + " - FFPopSim.SINGLE_CROSSOVER: block recombination with crossover probability\n" + "\n" + ""}, + { "haploid_lowd_get_recombination_rate", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_recombination_rate, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the recombination rate between the specified locus and the following one.\n" + "\n" + ""}, + { "haploid_lowd_set_allele_frequencies", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_set_allele_frequencies, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize the population in linkage equilibrium with specified allele frequencies.\n" + "\n" + "Parameters:\n" + " - frequencies: an array of length L with all allele frequencies\n" + " - N: set the population size and, if still unset, the carrying\n" + " capacity to this value\n" + "\n" + ".. note:: the population size is only used for resampling and has therefore\n" + " no effect on the speed of the simulation.\n" + "\n" + ""}, + { "haploid_lowd_set_wildtype", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_set_wildtype, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize population of N individuals with the - allele at all loci (wildtype)\n" + "\n" + "Parameters:\n" + " - N: the number of individuals\n" + "\n" + ".. note:: the carrying capacity is set to the same value if still unset.\n" + "\n" + ""}, + { "haploid_lowd__set_recombination_model", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_recombination_model, METH_VARARGS|METH_KEYWORDS, "_set_recombination_model(haploid_lowd self, int rec_model) -> int"}, + { "haploid_lowd__set_recombination_rates", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_recombination_rates, METH_VARARGS|METH_KEYWORDS, "_set_recombination_rates(haploid_lowd self, double * rec_rates, int rec_model=-1) -> int"}, + { "haploid_lowd_evolve", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_evolve, METH_VARARGS|METH_KEYWORDS, "\n" + "Evolve for some generations\n" + "\n" + "Parameters:\n" + " - gen: number of generations to evolve the population, defaults to one\n" + "\n" + ""}, + { "haploid_lowd_evolve_norec", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_evolve_norec, METH_VARARGS|METH_KEYWORDS, "\n" + "Evolve for some generations without recombination\n" + "\n" + "Parameters:\n" + " - gen: number of generations to evolve the population\n" + "\n" + ""}, + { "haploid_lowd_evolve_deterministic", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_evolve_deterministic, METH_VARARGS|METH_KEYWORDS, "\n" + "Evolve for some generations deterministically (skips the resampling)\n" + "\n" + "Parameters:\n" + " - gen: number of generations to evolve the population\n" + "\n" + ""}, + { "haploid_lowd_get_genotype_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_genotype_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of a genotype\n" + "\n" + "Parameters:\n" + " - genotype: genotype, whose the frequency is to be returned\n" + "\n" + "Returns:\n" + " - the frequency of the genotype\n" + "\n" + ""}, + { "haploid_lowd_get_allele_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_allele_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of the + allele\n" + "\n" + "Parameters:\n" + " - locus: locus, at which the frequency of the + allele is to be computed\n" + "\n" + "Returns:\n" + " - the frequency of the + allele, :math:`\\nu_i := \\frac{1 + \\left}{2}`, where :math:`s_i \\in \\{-1, 1\\}`.\n" + "\n" + ""}, + { "haploid_lowd_get_pair_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_pair_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of genotypes with the + allele at both loci.\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the joint frequency of the + alleles\n" + "\n" + ""}, + { "haploid_lowd_get_chi", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_chi, METH_VARARGS|METH_KEYWORDS, "\n" + "Get chi of an allele in the -/+ basis\n" + "\n" + "Parameters:\n" + " - locus: locus whose chi is to be computed\n" + "\n" + "Returns:\n" + " - the chi of that allele, :math:`\\chi_i := \\left`, where :math:`s_i \\in \\{-1, 1\\}`.\n" + "\n" + ""}, + { "haploid_lowd_get_chi2", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_chi2, METH_VARARGS|METH_KEYWORDS, "\n" + "Get :math:`\\chi_{ij}`\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the linkage disequilibiurm between them, i.e. :math:`\\chi_{ij} := \\left - \\chi_i \\cdot \\chi_j`.\n" + "\n" + ""}, + { "haploid_lowd_get_LD", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_LD, METH_VARARGS|METH_KEYWORDS, "\n" + "Get linkage disequilibrium\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the linkage disequilibiurm between them, i.e. :math:`D_{ij} := 1 / 4 \\left[\\left - \\chi_i \\cdot \\chi_j\\right]`.\n" + "\n" + ""}, + { "haploid_lowd_get_moment", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_moment, METH_VARARGS|METH_KEYWORDS, "\n" + "Get moment of two alleles in the -/+ basis\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the second moment, i.e. :math:`\\left`, where :math:`s_i, s_j \\in \\{-1, 1\\}`.\n" + "\n" + ""}, + { "haploid_lowd_genotype_entropy", _wrap_haploid_lowd_genotype_entropy, METH_O, "\n" + "Get the genotype entropy of the population\n" + "\n" + ".. note:: the genotype entropy is defined as :math:`-\\sum_{i=0}^{2^L} p_i \\log p_i`.\n" + "\n" + ""}, + { "haploid_lowd_allele_entropy", _wrap_haploid_lowd_allele_entropy, METH_O, "\n" + "get the allele entropy of the population\n" + "\n" + ".. note:: the allele entropy is defined as :math:`-\\sum_{i=0}^{L} \\left[\\nu_i\\log \\nu_i + (1-\\nu_i)\\log(1-\\nu_i)\\right]`.\n" + "\n" + ""}, + { "haploid_lowd_get_fitness", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_fitness, METH_VARARGS|METH_KEYWORDS, "\n" + "Get fitness values of a genotype\n" + "\n" + "Parameters:\n" + " - genotype: genotype whose fitness is to be calculated. This can either be an integer or in binary format, e.g. 5 = 0b101\n" + "\n" + "Returns:\n" + " - the fitness of that genotype.\n" + "\n" + ""}, + { "haploid_lowd_get_fitness_coefficient", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_fitness_coefficient, METH_VARARGS|METH_KEYWORDS, "\n" + "Get fitness coefficient of a combination (bitset) of loci\n" + "\n" + "Parameters:\n" + " - loci_bitset: Bitset of loci interested by the coefficient (see below). This can either be an integer or in binary format, e.g. 5 = 0b101\n" + "\n" + ".. note:: Examples for loci_bitset:\n" + " - 0: fitness baseline for the population\n" + " - (1 << X): additive coefficient for locus X\n" + " - (1 << X) + (1 << Y): epistatic (2-locus) coefficient between loci X and Y\n" + "\n" + ".. note:: Remember that FFPopSim uses 1/-1 based hypercubes.\n" + "\n" + "Returns:\n" + " - the fitness coefficient of that combination of loci.\n" + "\n" + ""}, + { "haploid_lowd_get_fitness_statistics", _wrap_haploid_lowd_get_fitness_statistics, METH_O, "get_fitness_statistics(haploid_lowd self) -> stat"}, + { "haploid_lowd___str__", _wrap_haploid_lowd___str__, METH_O, "x.__str__() <==> str(x)"}, + { "haploid_lowd___repr__", _wrap_haploid_lowd___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "haploid_lowd_L_get", _wrap_haploid_lowd_L_get, METH_O, "Number of loci (read-only)"}, + { "haploid_lowd_number_of_loci_get", _wrap_haploid_lowd_number_of_loci_get, METH_O, "Number of loci (read-only)"}, + { "haploid_lowd_N_get", _wrap_haploid_lowd_N_get, METH_O, "Population size (read-only)"}, + { "haploid_lowd_population_size_get", _wrap_haploid_lowd_population_size_get, METH_O, "Population size (read-only)"}, + { "haploid_lowd_generation_set", _wrap_haploid_lowd_generation_set, METH_VARARGS, "Current generation (read-only)"}, + { "haploid_lowd_generation_get", _wrap_haploid_lowd_generation_get, METH_O, "Current generation (read-only)"}, + { "haploid_lowd__set_genotypes", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_genotypes, METH_VARARGS|METH_KEYWORDS, "_set_genotypes(haploid_lowd self, int len1, int len2) -> int"}, + { "haploid_lowd__set_mutation_rates", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_mutation_rates, METH_VARARGS|METH_KEYWORDS, "_set_mutation_rates(haploid_lowd self, double * IN_ARRAY2) -> int"}, + { "haploid_lowd_get_fitnesses", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_fitnesses, METH_VARARGS|METH_KEYWORDS, "Get the fitness of all possible genotypes."}, + { "haploid_lowd_get_fitness_coefficients", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_get_fitness_coefficients, METH_VARARGS|METH_KEYWORDS, "\n" + "Get all fitness coefficients.\n" + "\n" + "The order of the coefficient is by bitset of interested loci:\n" + "- the population baseline is at position 0\n" + "- the additive term of locus X is at position (1 << X), i.e. 2^X\n" + "- the 2-locus epistatic term between loci X and Y is at (1 << X) + (1 << Y), i.e. 2^X + 2^Y\n" + "and so on.\n" + "\n" + "For instance, the following indices contain:\n" + "0 aka 0b0: baseline for the population\n" + "1 aka 0b1: additive coefficient for the first locus\n" + "2 aka 0b10: additive coefficient for the second locus\n" + "3 aka 0b11: epistatic coefficient bewteen locus one and two\n" + "4 aka 0b100: additive coefficient for the third locus\n" + "5 aka 0b101: epistatic coefficient between locus one and three\n" + "6 aka 0b110: epistatic coefficient between locus two and three\n" + "7 aka 0b111: epistatic coefficient among loci one, two, and three (3-locus term)\n" + "and so on.\n" + "\n" + ""}, + { "haploid_lowd__set_fitness_func", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_fitness_func, METH_VARARGS|METH_KEYWORDS, "_set_fitness_func(haploid_lowd self, int len1, int len2) -> int"}, + { "haploid_lowd__set_fitness_coeff", (PyCFunction)(void(*)(void))_wrap_haploid_lowd__set_fitness_coeff, METH_VARARGS|METH_KEYWORDS, "_set_fitness_coeff(haploid_lowd self, int len1, int len2) -> int"}, + { "haploid_lowd_set_fitness_additive", (PyCFunction)(void(*)(void))_wrap_haploid_lowd_set_fitness_additive, METH_VARARGS|METH_KEYWORDS, "\n" + "Set an additive fitness landscape. Coefficients obey +/- convention.\n" + "\n" + "Parameters:\n" + " - coefficients: array/list of additive fitness coefficients. It must have length L.\n" + "\n" + ""}, + { "haploid_lowd_swigregister", haploid_lowd_swigregister, METH_O, NULL}, + { "haploid_lowd_swiginit", haploid_lowd_swiginit, METH_VARARGS, NULL}, + { "clone_genotype_set", _wrap_clone_genotype_set, METH_VARARGS, "Genotype of the clone"}, + { "clone_genotype_get", _wrap_clone_genotype_get, METH_O, "Genotype of the clone"}, + { "clone_fitness_set", _wrap_clone_fitness_set, METH_VARARGS, "Fitness of the clone"}, + { "clone_fitness_get", _wrap_clone_fitness_get, METH_O, "Fitness of the clone"}, + { "clone_clone_size_set", _wrap_clone_clone_size_set, METH_VARARGS, "Number of individuals of the clone"}, + { "clone_clone_size_get", _wrap_clone_clone_size_get, METH_O, "Number of individuals of the clone"}, + { "new_clone", (PyCFunction)(void(*)(void))_wrap_new_clone, METH_VARARGS|METH_KEYWORDS, "Clone of isogenetic individuals"}, + { "clone___eq__", (PyCFunction)(void(*)(void))_wrap_clone___eq__, METH_VARARGS|METH_KEYWORDS, "__eq__(clone self, clone other) -> bool"}, + { "clone___ne__", (PyCFunction)(void(*)(void))_wrap_clone___ne__, METH_VARARGS|METH_KEYWORDS, "__ne__(clone self, clone other) -> bool"}, + { "clone___lt__", (PyCFunction)(void(*)(void))_wrap_clone___lt__, METH_VARARGS|METH_KEYWORDS, "__lt__(clone self, clone other) -> bool"}, + { "clone___gt__", (PyCFunction)(void(*)(void))_wrap_clone___gt__, METH_VARARGS|METH_KEYWORDS, "__gt__(clone self, clone other) -> bool"}, + { "clone___str__", _wrap_clone___str__, METH_O, "x.__str__() <==> str(x)"}, + { "clone___repr__", _wrap_clone___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "clone_number_of_traits_get", _wrap_clone_number_of_traits_get, METH_O, "Number of traits (read-only)"}, + { "clone__get_trait", (PyCFunction)(void(*)(void))_wrap_clone__get_trait, METH_VARARGS|METH_KEYWORDS, "_get_trait(clone self, int DIM1)"}, + { "delete_clone", _wrap_delete_clone, METH_O, "delete_clone(clone self)"}, + { "clone_swigregister", clone_swigregister, METH_O, NULL}, + { "clone_swiginit", clone_swiginit, METH_VARARGS, NULL}, + { "tree_key_index_set", _wrap_tree_key_index_set, METH_VARARGS, "Index of the key"}, + { "tree_key_index_get", _wrap_tree_key_index_get, METH_O, "Index of the key"}, + { "tree_key_age_set", _wrap_tree_key_age_set, METH_VARARGS, "Age [in generations]"}, + { "tree_key_age_get", _wrap_tree_key_age_get, METH_O, "Age [in generations]"}, + { "tree_key___eq__", (PyCFunction)(void(*)(void))_wrap_tree_key___eq__, METH_VARARGS|METH_KEYWORDS, "__eq__(tree_key self, tree_key other) -> bool"}, + { "tree_key___ne__", (PyCFunction)(void(*)(void))_wrap_tree_key___ne__, METH_VARARGS|METH_KEYWORDS, "__ne__(tree_key self, tree_key other) -> bool"}, + { "tree_key___lt__", (PyCFunction)(void(*)(void))_wrap_tree_key___lt__, METH_VARARGS|METH_KEYWORDS, "__lt__(tree_key self, tree_key other) -> bool"}, + { "tree_key___gt__", (PyCFunction)(void(*)(void))_wrap_tree_key___gt__, METH_VARARGS|METH_KEYWORDS, "__gt__(tree_key self, tree_key other) -> bool"}, + { "new_tree_key", (PyCFunction)(void(*)(void))_wrap_new_tree_key, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize new tree_key.\n" + "\n" + "Parameters:\n" + " - index: index of the key\n" + " - age: age of the key\n" + "\n" + ""}, + { "tree_key___str__", _wrap_tree_key___str__, METH_O, "x.__str__() <==> str(x)"}, + { "tree_key___repr__", _wrap_tree_key___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "tree_key___hash__", _wrap_tree_key___hash__, METH_O, "__hash__(tree_key self) -> long const"}, + { "delete_tree_key", _wrap_delete_tree_key, METH_O, "delete_tree_key(tree_key self)"}, + { "tree_key_swigregister", tree_key_swigregister, METH_O, NULL}, + { "tree_key_swiginit", tree_key_swiginit, METH_VARARGS, NULL}, + { "tree_step_pos_set", _wrap_tree_step_pos_set, METH_VARARGS, "Position"}, + { "tree_step_pos_get", _wrap_tree_step_pos_get, METH_O, "Position"}, + { "tree_step_step_set", _wrap_tree_step_step_set, METH_VARARGS, "Step [in generations]"}, + { "tree_step_step_get", _wrap_tree_step_step_get, METH_O, "Step [in generations]"}, + { "tree_step___lt__", (PyCFunction)(void(*)(void))_wrap_tree_step___lt__, METH_VARARGS|METH_KEYWORDS, "__lt__(tree_step self, tree_step other) -> bool"}, + { "tree_step___gt__", (PyCFunction)(void(*)(void))_wrap_tree_step___gt__, METH_VARARGS|METH_KEYWORDS, "__gt__(tree_step self, tree_step other) -> bool"}, + { "tree_step___eq__", (PyCFunction)(void(*)(void))_wrap_tree_step___eq__, METH_VARARGS|METH_KEYWORDS, "__eq__(tree_step self, tree_step other) -> bool"}, + { "new_tree_step", (PyCFunction)(void(*)(void))_wrap_new_tree_step, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize new step.\n" + "\n" + "Parameters:\n" + " - pos: position\n" + " - step: length of step\n" + "\n" + ""}, + { "tree_step___str__", _wrap_tree_step___str__, METH_O, "x.__str__() <==> str(x)"}, + { "tree_step___repr__", _wrap_tree_step___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "tree_step___hash__", _wrap_tree_step___hash__, METH_O, "__hash__(tree_step self) -> long const"}, + { "delete_tree_step", _wrap_delete_tree_step, METH_O, "delete_tree_step(tree_step self)"}, + { "tree_step_swigregister", tree_step_swigregister, METH_O, NULL}, + { "tree_step_swiginit", tree_step_swiginit, METH_VARARGS, NULL}, + { "tree_node_parent_node_set", _wrap_tree_node_parent_node_set, METH_VARARGS, "Parent tree key"}, + { "tree_node_parent_node_get", _wrap_tree_node_parent_node_get, METH_O, "Parent tree key"}, + { "tree_node_own_key_set", _wrap_tree_node_own_key_set, METH_VARARGS, "Own tree key"}, + { "tree_node_own_key_get", _wrap_tree_node_own_key_get, METH_O, "Own tree key"}, + { "tree_node__child_edges_set", _wrap_tree_node__child_edges_set, METH_VARARGS, "tree_node__child_edges_set(tree_node self, list_tree_key child_edges)"}, + { "tree_node__child_edges_get", _wrap_tree_node__child_edges_get, METH_O, "tree_node__child_edges_get(tree_node self) -> list_tree_key"}, + { "tree_node_fitness_set", _wrap_tree_node_fitness_set, METH_VARARGS, "Fitness of the clone represented by the node"}, + { "tree_node_fitness_get", _wrap_tree_node_fitness_get, METH_O, "Fitness of the clone represented by the node"}, + { "tree_node__weight_distribution_set", _wrap_tree_node__weight_distribution_set, METH_VARARGS, "tree_node__weight_distribution_set(tree_node self, vector_tree_step weight_distribution)"}, + { "tree_node__weight_distribution_get", _wrap_tree_node__weight_distribution_get, METH_O, "tree_node__weight_distribution_get(tree_node self) -> vector_tree_step"}, + { "tree_node_number_of_offspring_set", _wrap_tree_node_number_of_offspring_set, METH_VARARGS, "Number of offspring"}, + { "tree_node_number_of_offspring_get", _wrap_tree_node_number_of_offspring_get, METH_O, "Number of offspring"}, + { "tree_node_clone_size_set", _wrap_tree_node_clone_size_set, METH_VARARGS, "Size of the clone represented by the node"}, + { "tree_node_clone_size_get", _wrap_tree_node_clone_size_get, METH_O, "Size of the clone represented by the node"}, + { "tree_node_sampled_set", _wrap_tree_node_sampled_set, METH_VARARGS, "tree_node_sampled_set(tree_node self, int sampled)"}, + { "tree_node_sampled_get", _wrap_tree_node_sampled_get, METH_O, "tree_node_sampled_get(tree_node self) -> int"}, + { "tree_node_sequence_set", _wrap_tree_node_sequence_set, METH_VARARGS, "tree_node_sequence_set(tree_node self, boost::dynamic_bitset< > sequence)"}, + { "tree_node_sequence_get", _wrap_tree_node_sequence_get, METH_O, "tree_node_sequence_get(tree_node self) -> boost::dynamic_bitset< >"}, + { "tree_node___str__", _wrap_tree_node___str__, METH_O, "x.__str__() <==> str(x)"}, + { "tree_node___repr__", _wrap_tree_node___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "tree_node__get_crossover_chunk", (PyCFunction)(void(*)(void))_wrap_tree_node__get_crossover_chunk, METH_VARARGS|METH_KEYWORDS, "_get_crossover_chunk(tree_node self, int i) -> int"}, + { "tree_node__set_crossover_chunk", (PyCFunction)(void(*)(void))_wrap_tree_node__set_crossover_chunk, METH_VARARGS|METH_KEYWORDS, "_set_crossover_chunk(tree_node self, int value, int i)"}, + { "new_tree_node", _wrap_new_tree_node, METH_NOARGS, "Node of a phylogenetic tree"}, + { "delete_tree_node", _wrap_delete_tree_node, METH_O, "delete_tree_node(tree_node self)"}, + { "tree_node_swigregister", tree_node_swigregister, METH_O, NULL}, + { "tree_node_swiginit", tree_node_swiginit, METH_VARARGS, NULL}, + { "tree_edge_parent_node_set", _wrap_tree_edge_parent_node_set, METH_VARARGS, "Parent tree key"}, + { "tree_edge_parent_node_get", _wrap_tree_edge_parent_node_get, METH_O, "Parent tree key"}, + { "tree_edge_own_key_set", _wrap_tree_edge_own_key_set, METH_VARARGS, "Own tree key"}, + { "tree_edge_own_key_get", _wrap_tree_edge_own_key_get, METH_O, "Own tree key"}, + { "tree_edge_length_set", _wrap_tree_edge_length_set, METH_VARARGS, "Edge length [in generations]"}, + { "tree_edge_length_get", _wrap_tree_edge_length_get, METH_O, "Edge length [in generations]"}, + { "tree_edge_number_of_offspring_set", _wrap_tree_edge_number_of_offspring_set, METH_VARARGS, "Number of offspring"}, + { "tree_edge_number_of_offspring_get", _wrap_tree_edge_number_of_offspring_get, METH_O, "Number of offspring"}, + { "tree_edge___str__", _wrap_tree_edge___str__, METH_O, "x.__str__() <==> str(x)"}, + { "tree_edge___repr__", _wrap_tree_edge___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "tree_edge__get_segment_chunk", (PyCFunction)(void(*)(void))_wrap_tree_edge__get_segment_chunk, METH_VARARGS|METH_KEYWORDS, "_get_segment_chunk(tree_edge self, int i) -> int"}, + { "new_tree_edge", _wrap_new_tree_edge, METH_NOARGS, "Edge of a phylogenetic tree"}, + { "delete_tree_edge", _wrap_delete_tree_edge, METH_O, "delete_tree_edge(tree_edge self)"}, + { "tree_edge_swigregister", tree_edge_swigregister, METH_O, NULL}, + { "tree_edge_swiginit", tree_edge_swiginit, METH_VARARGS, NULL}, + { "polymorphism_birth_set", _wrap_polymorphism_birth_set, METH_VARARGS, "Birth generation"}, + { "polymorphism_birth_get", _wrap_polymorphism_birth_get, METH_O, "Birth generation"}, + { "polymorphism_sweep_time_set", _wrap_polymorphism_sweep_time_set, METH_VARARGS, "Sweep time [in generations]"}, + { "polymorphism_sweep_time_get", _wrap_polymorphism_sweep_time_get, METH_O, "Sweep time [in generations]"}, + { "polymorphism_effect_set", _wrap_polymorphism_effect_set, METH_VARARGS, "Fitness effect of the mutation"}, + { "polymorphism_effect_get", _wrap_polymorphism_effect_get, METH_O, "Fitness effect of the mutation"}, + { "polymorphism_fitness_set", _wrap_polymorphism_fitness_set, METH_VARARGS, "Relative fitness of the clone at birth"}, + { "polymorphism_fitness_get", _wrap_polymorphism_fitness_get, METH_O, "Relative fitness of the clone at birth"}, + { "polymorphism_fitness_variance_set", _wrap_polymorphism_fitness_variance_set, METH_VARARGS, "Fitness variance of the population at birth"}, + { "polymorphism_fitness_variance_get", _wrap_polymorphism_fitness_variance_get, METH_O, "Fitness variance of the population at birth"}, + { "new_polymorphism", (PyCFunction)(void(*)(void))_wrap_new_polymorphism, METH_VARARGS|METH_KEYWORDS, "Polymorphism history"}, + { "polymorphism___str__", _wrap_polymorphism___str__, METH_O, "x.__str__() <==> str(x)"}, + { "polymorphism___repr__", _wrap_polymorphism___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "delete_polymorphism", _wrap_delete_polymorphism, METH_O, "delete_polymorphism(polymorphism self)"}, + { "polymorphism_swigregister", polymorphism_swigregister, METH_O, NULL}, + { "polymorphism_swiginit", polymorphism_swiginit, METH_VARARGS, NULL}, + { "rooted_tree__edges_set", _wrap_rooted_tree__edges_set, METH_VARARGS, "rooted_tree__edges_set(rooted_tree self, map_key_edge edges)"}, + { "rooted_tree__edges_get", _wrap_rooted_tree__edges_get, METH_O, "rooted_tree__edges_get(rooted_tree self) -> map_key_edge"}, + { "rooted_tree__nodes_set", _wrap_rooted_tree__nodes_set, METH_VARARGS, "rooted_tree__nodes_set(rooted_tree self, map_key_node nodes)"}, + { "rooted_tree__nodes_get", _wrap_rooted_tree__nodes_get, METH_O, "rooted_tree__nodes_get(rooted_tree self) -> map_key_node"}, + { "rooted_tree__leafs_set", _wrap_rooted_tree__leafs_set, METH_VARARGS, "rooted_tree__leafs_set(rooted_tree self, vector_tree_key leafs)"}, + { "rooted_tree__leafs_get", _wrap_rooted_tree__leafs_get, METH_O, "rooted_tree__leafs_get(rooted_tree self) -> vector_tree_key"}, + { "rooted_tree__sampled_leafs_set", _wrap_rooted_tree__sampled_leafs_set, METH_VARARGS, "rooted_tree__sampled_leafs_set(rooted_tree self, vector_tree_key sampled_leafs)"}, + { "rooted_tree__sampled_leafs_get", _wrap_rooted_tree__sampled_leafs_get, METH_O, "rooted_tree__sampled_leafs_get(rooted_tree self) -> vector_tree_key"}, + { "rooted_tree_root_set", _wrap_rooted_tree_root_set, METH_VARARGS, "rooted_tree_root_set(rooted_tree self, tree_key root)"}, + { "rooted_tree_root_get", _wrap_rooted_tree_root_get, METH_O, "rooted_tree_root_get(rooted_tree self) -> tree_key"}, + { "rooted_tree_MRCA_set", _wrap_rooted_tree_MRCA_set, METH_VARARGS, "rooted_tree_MRCA_set(rooted_tree self, tree_key MRCA)"}, + { "rooted_tree_MRCA_get", _wrap_rooted_tree_MRCA_get, METH_O, "rooted_tree_MRCA_get(rooted_tree self) -> tree_key"}, + { "new_rooted_tree", _wrap_new_rooted_tree, METH_NOARGS, "\n" + "Rooted phylogenetic tree.\n" + "\n" + "This class is used to represent the phylogenetic tree of a single locus.\n" + "It is possible to print the tree in Newick format, to get the subtree\n" + "spanned by some of the leaves, and to look at the tree nodes and edges.\n" + "\n" + ""}, + { "delete_rooted_tree", _wrap_delete_rooted_tree, METH_O, "delete_rooted_tree(rooted_tree self)"}, + { "rooted_tree_external_branch_length", _wrap_rooted_tree_external_branch_length, METH_O, "\n" + "Measure the length of the external branches.\n" + "\n" + "Returns:\n" + " - length: the sum of the lengths of the external branches.\n" + "\n" + ""}, + { "rooted_tree_total_branch_length", _wrap_rooted_tree_total_branch_length, METH_O, "\n" + "Measure the length of the branches.\n" + "\n" + "Returns:\n" + " - length: the sum of the lengths of all branches.\n" + "\n" + ""}, + { "rooted_tree_calc_weight_distribution", (PyCFunction)(void(*)(void))_wrap_rooted_tree_calc_weight_distribution, METH_VARARGS|METH_KEYWORDS, "\n" + "Recalculate the weight of some internal nodes.\n" + "\n" + "Parameters:\n" + " - subtree_root: the tree_key of the node whose hanging subtree is recalculated\n" + "\n" + "Returns:\n" + " - error code: zero if successful\n" + "\n" + ""}, + { "rooted_tree_print_newick", _wrap_rooted_tree_print_newick, METH_O, "\n" + "Print the tree in Newick format.\n" + "\n" + "Returns:\n" + " - tree: string of the tree in Newick format.\n" + "\n" + ".. note:: You can pipe the output of this function to a cStingIO.StringIO\n" + " for further manipulations.\n" + "\n" + ""}, + { "rooted_tree_print_sequences", _wrap_rooted_tree_print_sequences, METH_O, "print_sequences(rooted_tree self) -> string"}, + { "rooted_tree_subtree_newick", (PyCFunction)(void(*)(void))_wrap_rooted_tree_subtree_newick, METH_VARARGS|METH_KEYWORDS, "\n" + "Print a subtree in Newick format.\n" + "\n" + "Parameters:\n" + " - subtree_root: tree_key of the root of the subtree to print\n" + "\n" + "Returns:\n" + " - subtree: string of the subtree in Newick format.\n" + "\n" + ".. note:: You can pipe the output of this function to a cStingIO.StringIO\n" + " for further manipulations.\n" + "\n" + ""}, + { "rooted_tree_print_weight_distribution", (PyCFunction)(void(*)(void))_wrap_rooted_tree_print_weight_distribution, METH_VARARGS|METH_KEYWORDS, "print_weight_distribution(rooted_tree self, tree_key node_key) -> string"}, + { "rooted_tree_read_newick", (PyCFunction)(void(*)(void))_wrap_rooted_tree_read_newick, METH_VARARGS|METH_KEYWORDS, "\n" + "Read from Newick string.\n" + "\n" + "Returns:\n" + " - zero if successful, nonzero otherwise.\n" + "\n" + ""}, + { "rooted_tree_get_sampled_leafs", _wrap_rooted_tree_get_sampled_leafs, METH_O, "get_sampled_leafs(rooted_tree self) -> vector_tree_key"}, + { "rooted_tree_set_sampled_leafs", (PyCFunction)(void(*)(void))_wrap_rooted_tree_set_sampled_leafs, METH_VARARGS|METH_KEYWORDS, "set_sampled_leafs(rooted_tree self, vector_tree_key leafs)"}, + { "rooted_tree___str__", _wrap_rooted_tree___str__, METH_O, "x.__str__() <==> str(x)"}, + { "rooted_tree___repr__", _wrap_rooted_tree___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "rooted_tree__ancestors_at_age", (PyCFunction)(void(*)(void))_wrap_rooted_tree__ancestors_at_age, METH_VARARGS|METH_KEYWORDS, "_ancestors_at_age(rooted_tree self, int age, tree_key subtree_root) -> vector_tree_key"}, + { "rooted_tree_create_subtree_from_keys", (PyCFunction)(void(*)(void))_wrap_rooted_tree_create_subtree_from_keys, METH_VARARGS|METH_KEYWORDS, "\n" + "Create a subtree from a list of leaves.\n" + "\n" + "Parameters:\n" + " - leaves: the leaves used to contruct the subtree\n" + "\n" + "Returns:\n" + " - subtree: the subtree spanned by those leaves.\n" + "\n" + ".. note:: leaves can be a Python list or a numpy array of tree_key, or a vector_tree_key.\n" + "\n" + ""}, + { "rooted_tree_swigregister", rooted_tree_swigregister, METH_O, NULL}, + { "rooted_tree_swiginit", rooted_tree_swiginit, METH_VARARGS, NULL}, + { "new_multi_locus_genealogy", _wrap_new_multi_locus_genealogy, METH_NOARGS, "Default constructor"}, + { "delete_multi_locus_genealogy", _wrap_delete_multi_locus_genealogy, METH_O, "delete_multi_locus_genealogy(multi_locus_genealogy self)"}, + { "multi_locus_genealogy_track_locus", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy_track_locus, METH_VARARGS|METH_KEYWORDS, "\n" + "Start tracking a new locus.\n" + "\n" + "Parameters:\n" + " - new_locus: locus to be tracked\n" + "\n" + ".. note:: the locus gets appended to the 'loci' array.\n" + "\n" + ""}, + { "multi_locus_genealogy_reset", _wrap_multi_locus_genealogy_reset, METH_O, "Reset (empty) the genealogy."}, + { "multi_locus_genealogy_reset_but_loci", _wrap_multi_locus_genealogy_reset_but_loci, METH_O, "Reset (empty) the genealogy but keep the loci indices."}, + { "multi_locus_genealogy___str__", _wrap_multi_locus_genealogy___str__, METH_O, "x.__str__() <==> str(x)"}, + { "multi_locus_genealogy___repr__", _wrap_multi_locus_genealogy___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "multi_locus_genealogy__get_number_of_loci", _wrap_multi_locus_genealogy__get_number_of_loci, METH_O, "_get_number_of_loci(multi_locus_genealogy self) -> int"}, + { "multi_locus_genealogy__get_loci", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy__get_loci, METH_VARARGS|METH_KEYWORDS, "_get_loci(multi_locus_genealogy self, int DIM1)"}, + { "multi_locus_genealogy_get_tree", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy_get_tree, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the genealogy tree for a certain locus.\n" + "\n" + "Parameters:\n" + " - locus: site whose tree is being returned\n" + "\n" + ".. note:: if you want to know what loci are being tracked, look into the 'loci'\n" + " attribute.\n" + "\n" + ""}, + { "multi_locus_genealogy__set_tree", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy__set_tree, METH_VARARGS|METH_KEYWORDS, "_set_tree(multi_locus_genealogy self, int locus, rooted_tree tree)"}, + { "multi_locus_genealogy__get_newGeneration", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy__get_newGeneration, METH_VARARGS|METH_KEYWORDS, "_get_newGeneration(multi_locus_genealogy self, int locus) -> vector_tree_node"}, + { "multi_locus_genealogy__set_newGeneration", (PyCFunction)(void(*)(void))_wrap_multi_locus_genealogy__set_newGeneration, METH_VARARGS|METH_KEYWORDS, "_set_newGeneration(multi_locus_genealogy self, int locus, vector_tree_node newGeneration)"}, + { "multi_locus_genealogy_swigregister", multi_locus_genealogy_swigregister, METH_O, NULL}, + { "multi_locus_genealogy_swiginit", multi_locus_genealogy_swiginit, METH_VARARGS, NULL}, + { "new_haploid_highd", (PyCFunction)(void(*)(void))_wrap_new_haploid_highd, METH_VARARGS|METH_KEYWORDS, "\n" + "Construct a high-dimensional population with certain parameters.\n" + "\n" + "Parameters:\n" + " - L: number of loci\n" + " - rng_seed: seed for the random generator. If zero (default) pick a random number\n" + " - number_of_traits: number of phenotypic traits, defaults to one\n" + " - all_polymorphic: option to use an infinite-sites model tracking ancestral alleles\n" + " (only available with a single phenotypic trait and zero mutation rate)\n" + "\n" + ""}, + { "delete_haploid_highd", _wrap_delete_haploid_highd, METH_O, "delete_haploid_highd(haploid_highd self)"}, + { "haploid_highd_carrying_capacity_set", _wrap_haploid_highd_carrying_capacity_set, METH_VARARGS, "current carrying capacity of the environment"}, + { "haploid_highd_carrying_capacity_get", _wrap_haploid_highd_carrying_capacity_get, METH_O, "current carrying capacity of the environment"}, + { "haploid_highd_outcrossing_rate_set", _wrap_haploid_highd_outcrossing_rate_set, METH_VARARGS, "outcrossing rate (probability of sexual reproduction per generation)"}, + { "haploid_highd_outcrossing_rate_get", _wrap_haploid_highd_outcrossing_rate_get, METH_O, "outcrossing rate (probability of sexual reproduction per generation)"}, + { "haploid_highd_crossover_rate_set", _wrap_haploid_highd_crossover_rate_set, METH_VARARGS, "crossover rate (probability of crossover per site per generation)"}, + { "haploid_highd_crossover_rate_get", _wrap_haploid_highd_crossover_rate_get, METH_O, "crossover rate (probability of crossover per site per generation)"}, + { "haploid_highd_recombination_model_set", _wrap_haploid_highd_recombination_model_set, METH_VARARGS, "\n" + "Model of recombination to use\n" + "\n" + "Available values:\n" + " - FFPopSim.FREE_RECOMBINATION: free reassortment of all loci between parents\n" + " - FFPopSim.CROSSOVERS: linear chromosome with crossover probability per locus\n" + "\n" + ""}, + { "haploid_highd_recombination_model_get", _wrap_haploid_highd_recombination_model_get, METH_O, "\n" + "Model of recombination to use\n" + "\n" + "Available values:\n" + " - FFPopSim.FREE_RECOMBINATION: free reassortment of all loci between parents\n" + " - FFPopSim.CROSSOVERS: linear chromosome with crossover probability per locus\n" + "\n" + ""}, + { "haploid_highd_circular_set", _wrap_haploid_highd_circular_set, METH_VARARGS, "is the genome circular?"}, + { "haploid_highd_circular_get", _wrap_haploid_highd_circular_get, METH_O, "is the genome circular?"}, + { "haploid_highd_growth_rate_set", _wrap_haploid_highd_growth_rate_set, METH_VARARGS, "\n" + "Growth rate\n" + "\n" + "This value is used to determine how fast a population converges to the\n" + "carrying capacity.\n" + "\n" + "This parameter must be set strictly larger than 1 (very slow growth) and not\n" + "too big to avoid population explosion. The default is 2, which means that a\n" + "freely expanding population (N << carrying capacity) approximately doubles in\n" + "size every generation.\n" + "\n" + "Note that when the population is shrinking, in order to avoid extinction, the\n" + "population decreases by ten times or so only. If you want a hard bottleneck,\n" + "use the bottleneck function.\n" + "\n" + ""}, + { "haploid_highd_growth_rate_get", _wrap_haploid_highd_growth_rate_get, METH_O, "\n" + "Growth rate\n" + "\n" + "This value is used to determine how fast a population converges to the\n" + "carrying capacity.\n" + "\n" + "This parameter must be set strictly larger than 1 (very slow growth) and not\n" + "too big to avoid population explosion. The default is 2, which means that a\n" + "freely expanding population (N << carrying capacity) approximately doubles in\n" + "size every generation.\n" + "\n" + "Note that when the population is shrinking, in order to avoid extinction, the\n" + "population decreases by ten times or so only. If you want a hard bottleneck,\n" + "use the bottleneck function.\n" + "\n" + ""}, + { "haploid_highd_all_polymorphic_set", _wrap_haploid_highd_all_polymorphic_set, METH_VARARGS, "All polymorphic?"}, + { "haploid_highd_all_polymorphic_get", _wrap_haploid_highd_all_polymorphic_get, METH_O, "All polymorphic?"}, + { "haploid_highd__get_mutation_rate", _wrap_haploid_highd__get_mutation_rate, METH_O, "_get_mutation_rate(haploid_highd self) -> double"}, + { "haploid_highd__set_mutation_rate", (PyCFunction)(void(*)(void))_wrap_haploid_highd__set_mutation_rate, METH_VARARGS|METH_KEYWORDS, "_set_mutation_rate(haploid_highd self, double m)"}, + { "haploid_highd_get_all_polymorphic", _wrap_haploid_highd_get_all_polymorphic, METH_O, "get_all_polymorphic(haploid_highd self) -> bool"}, + { "haploid_highd_set_all_polymorphic", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_all_polymorphic, METH_VARARGS|METH_KEYWORDS, "set_all_polymorphic(haploid_highd self, bool ap)"}, + { "haploid_highd__get_polymorphisms", _wrap_haploid_highd__get_polymorphisms, METH_O, "_get_polymorphisms(haploid_highd self) -> vector_polymorphism"}, + { "haploid_highd__get_fixed_mutations", _wrap_haploid_highd__get_fixed_mutations, METH_O, "_get_fixed_mutations(haploid_highd self) -> vector_polymorphism"}, + { "haploid_highd__get_number_of_mutations", _wrap_haploid_highd__get_number_of_mutations, METH_O, "_get_number_of_mutations(haploid_highd self) -> _intVector"}, + { "haploid_highd_set_allele_frequencies", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_allele_frequencies, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize the population according to the given allele frequencies in linkage equilibrium.\n" + "\n" + "Parameters:\n" + " - frequencies: an array of length L with all allele frequencies\n" + " - N: set the population size and, if still unset, the carrying\n" + " capacity to this value\n" + "\n" + ""}, + { "haploid_highd_set_wildtype", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_wildtype, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize a population of wildtype individuals\n" + "\n" + "Parameters:\n" + " - N: the number of individuals\n" + "\n" + ".. note:: the carrying capacity is set to the same value if still unset.\n" + "\n" + ""}, + { "haploid_highd_track_locus_genealogy", (PyCFunction)(void(*)(void))_wrap_haploid_highd_track_locus_genealogy, METH_VARARGS|METH_KEYWORDS, "\n" + "\n" + "Track the genealogy of some loci.\n" + "\n" + "Parameters:\n" + " - loci: sites whose genealogy is being stored\n" + "\n" + "Returns:\n" + " - zero if successful\n" + "\n" + ""}, + { "haploid_highd_add_genotype", (PyCFunction)(void(*)(void))_wrap_haploid_highd_add_genotype, METH_VARARGS|METH_KEYWORDS, "\n" + "Add new individuals to the population with certain genotypes\n" + "\n" + "Parameters:\n" + " - genotype: genotype to add to the population (Boolean list)\n" + " - n: number of new individuals carrying that genotype\n" + "\n" + ""}, + { "haploid_highd_add_trait_coefficient", (PyCFunction)(void(*)(void))_wrap_haploid_highd_add_trait_coefficient, METH_VARARGS|METH_KEYWORDS, "\n" + "Add a coefficient to the trait landscape.\n" + "\n" + "Parameters:\n" + " - value: value of the coefficient\n" + " - loci: array/list of loci indexed by the coefficient.\n" + " - t: number of the trait to be changed\n" + "\n" + "**Example**: to set a second-order epistatic term :math:`t_{ij} = 0.1`, use ``add_trait_coefficient(0.1, [i, j])``.\n" + "\n" + ".. warning:: the -/+ basis is used throughout the library. If you are used to the 0/1 basis, keep in mind that the interaction series-expansion is different.\n" + "\n" + ""}, + { "haploid_highd_clear_trait", (PyCFunction)(void(*)(void))_wrap_haploid_highd_clear_trait, METH_VARARGS|METH_KEYWORDS, "\n" + "Clear a trait landscape.\n" + "\n" + "Parameters:\n" + " - t: number of the trait to be cleared\n" + "\n" + ""}, + { "haploid_highd_clear_traits", _wrap_haploid_highd_clear_traits, METH_O, "Clear all trait landscapes"}, + { "haploid_highd_set_random_trait_epistasis", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_random_trait_epistasis, METH_VARARGS|METH_KEYWORDS, "\n" + "Set a random epistatic term in the genotype-phenotype map. This is meant as an approximation to multi-locus epistasis to which many locus sets contribute. It assigns to each genotype a reprodrucible fitness component drawn from a Gaussian distribution.\n" + "\n" + "Parameters:\n" + " - epistasis_std: standard deviation of the random epistatic terms\n" + " - t: trait number\n" + "\n" + ".. note:: the epistatic terms will be Gaussian distributed around zero with the given standard deviation.\n" + "\n" + ""}, + { "haploid_highd_add_fitness_coefficient", (PyCFunction)(void(*)(void))_wrap_haploid_highd_add_fitness_coefficient, METH_VARARGS|METH_KEYWORDS, "Shortcut for add_trait_coefficient when there is only one trait"}, + { "haploid_highd_clear_fitness", _wrap_haploid_highd_clear_fitness, METH_O, "Shortcut for clear_trait when there is only one trait"}, + { "haploid_highd_set_random_epistasis", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_random_epistasis, METH_VARARGS|METH_KEYWORDS, "Shortcut for set_random_trait_epistasis when there is only one trait"}, + { "haploid_highd_evolve", (PyCFunction)(void(*)(void))_wrap_haploid_highd_evolve, METH_VARARGS|METH_KEYWORDS, "\n" + "Evolve for some generations.\n" + "\n" + "Parameters:\n" + " - gen: number of generations, defaults to one\n" + "\n" + ""}, + { "haploid_highd_bottleneck", (PyCFunction)(void(*)(void))_wrap_haploid_highd_bottleneck, METH_VARARGS|METH_KEYWORDS, "\n" + "Make the population undergo a bottleneck\n" + "\n" + "Parameters:\n" + " - size_of_bottleneck: the number of individuals at the bottleneck\n" + "\n" + ""}, + { "haploid_highd_flip_single_locus", (PyCFunction)(void(*)(void))_wrap_haploid_highd_flip_single_locus, METH_VARARGS|METH_KEYWORDS, "\n" + "\n" + "Take a random clone, flip the allele at the selected locus and create a new clone.\n" + "\n" + "Parameters:\n" + " - locus: locus to flip\n" + "\n" + "Returns:\n" + " - index: index of the new clone with the flipped locus\n" + "\n" + ""}, + { "haploid_highd_calc_stat", _wrap_haploid_highd_calc_stat, METH_O, "Calculate trait and fitness statistics for the population"}, + { "haploid_highd_unique_clones", _wrap_haploid_highd_unique_clones, METH_O, "\n" + "Recompress the clone structure\n" + "\n" + "During its evolution, identical clones might be generated by different routes at\n" + "different times. This function merges any such duplicates into unique clones with\n" + "the size equal to the sum of the sizes of the duplicates.\n" + "\n" + ""}, + { "haploid_highd__get_nonempty_clones", _wrap_haploid_highd__get_nonempty_clones, METH_O, "_get_nonempty_clones(haploid_highd self) -> _intVector"}, + { "haploid_highd_random_clone", _wrap_haploid_highd_random_clone, METH_O, "\n" + "Get a random clone\n" + "\n" + "Returns:\n" + " - clone: index of the random clone\n" + "\n" + ""}, + { "haploid_highd_get_diversity_statistics", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_diversity_statistics, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the mean and variance of the diversity in the population.\n" + "\n" + "Parameters:\n" + " - n_sample: number of individuals to sample at random from the population\n" + "\n" + "Returns:\n" + " - stat: structure with mean and variance of diversity in the population\n" + "\n" + ""}, + { "haploid_highd_get_divergence_statistics", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_divergence_statistics, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the mean and variance of the divergence in the population.\n" + "\n" + "Parameters:\n" + " - n_sample: number of individuals to sample at random from the population\n" + "\n" + "Returns:\n" + " - stat: structure with mean and variance of divergence in the population\n" + "\n" + ""}, + { "haploid_highd_get_allele_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_allele_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of the + allele at the selected locus\n" + "\n" + "Parameters:\n" + " - locus: locus whose frequency of the + allele is to be returned\n" + "\n" + "Returns:\n" + " - frequency: allele frequency in the population\n" + "\n" + ""}, + { "haploid_highd_get_derived_allele_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_derived_allele_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the frequency of the derived allele at the selected locus\n" + "\n" + "Parameters:\n" + " - locus: locus whose frequency of the derived allele is to be returned\n" + "\n" + "Returns:\n" + " - frequency: allele frequency in the population\n" + "\n" + ""}, + { "haploid_highd_get_ancestral_state", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_ancestral_state, METH_VARARGS|METH_KEYWORDS, "get_ancestral_state(haploid_highd self, int l) -> bool"}, + { "haploid_highd_get_pair_frequency", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_pair_frequency, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the joint frequency of two + alleles\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the joint frequency of the + alleles\n" + "\n" + ""}, + { "haploid_highd_get_chi", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_chi, METH_VARARGS|METH_KEYWORDS, "\n" + "Get :math:`\\chi_i` of an allele\n" + "\n" + "Parameters:\n" + " - locus: locus whose chi is to be computed\n" + "\n" + "Returns:\n" + " - the chi of that allele, :math:`\\chi_i := \\left`, where :math:`s_i \\in \\{\\pm1\\}`.\n" + "\n" + ""}, + { "haploid_highd_get_derived_chi", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_derived_chi, METH_VARARGS|METH_KEYWORDS, "\n" + "Get :math:`\\chi_i` of a derived allele\n" + "\n" + "Parameters:\n" + " - locus: locus whose chi is to be computed\n" + "\n" + "Returns:\n" + " - the chi of that derived allele, :math:`\\chi_i := \\left`, where :math:`s_i \\in \\{\\pm1\\}`.\n" + "\n" + ""}, + { "haploid_highd_get_chi2", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_chi2, METH_VARARGS|METH_KEYWORDS, "\n" + "Get :math:`\\chi_{ij}`\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the linkage disequilibiurm between them, i.e. :math:`\\chi_{ij} := \\left - \\chi_i \\cdot \\chi_j`.\n" + "\n" + ""}, + { "haploid_highd_get_LD", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_LD, METH_VARARGS|METH_KEYWORDS, "\n" + "Get linkage disequilibrium\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the linkage disequilibiurm between them, i.e. :math:`LD := 1 / 4 \\left[\\left - \\chi_i \\cdot \\chi_j\\right]`.\n" + "\n" + ""}, + { "haploid_highd_get_moment", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_moment, METH_VARARGS|METH_KEYWORDS, "\n" + "Get moment of two alleles in the -/+ basis\n" + "\n" + "Parameters:\n" + " - locus1: first locus\n" + " - locus2: second locus\n" + "\n" + "Returns:\n" + " - the second moment, i.e. :math:`\\left`, where :math:`s_i, s_j \\in \\{-1, 1\\}`.\n" + "\n" + ""}, + { "haploid_highd_get_trait_weight", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_weight, METH_VARARGS|METH_KEYWORDS, "get_trait_weight(haploid_highd self, int t) -> double"}, + { "haploid_highd_get_fitness", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_fitness, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the fitness of an individual\n" + "\n" + "Parameters:\n" + " - n: index of the clone whose fitness is to be computed\n" + "\n" + "Returns:\n" + " - fitness: fitness value of that clone\n" + "\n" + ""}, + { "haploid_highd_get_clone_size", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_clone_size, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the size of a clone\n" + "\n" + "Parameters:\n" + " - n: index of the clone\n" + "\n" + "Returns:\n" + " - size: size of the selected clone\n" + "\n" + ""}, + { "haploid_highd_get_trait", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait, METH_VARARGS|METH_KEYWORDS, "\n" + "Get a trait of an individual\n" + "\n" + "Parameters:\n" + " - n: index of the clone whose trait is to be computed\n" + " - t: trait to be computed\n" + "\n" + "Returns:\n" + " - trait: value of that trait for that clone\n" + "\n" + ""}, + { "haploid_highd_get_trait_epistasis", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_epistasis, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the epistatic terms of the genotype/phenotype map of the chosen trait.\n" + "\n" + "Parameters:\n" + " - t: trait number\n" + "\n" + "Returns:\n" + " - coefficients: tuple of coefficients, with a value and a tuple of loci\n" + "\n" + ".. note:: This function is designed to work well in conjunction with add_trait_coefficient.\n" + "\n" + ""}, + { "haploid_highd_get_fitness_statistics", _wrap_haploid_highd_get_fitness_statistics, METH_O, "\n" + "Get the mean and variance of the fitness in the population.\n" + "\n" + "Returns:\n" + " - stat: structure with mean and variance of the fitness in the population\n" + "\n" + ""}, + { "haploid_highd_get_trait_statistics", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_statistics, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the mean and variance of a trait in the population.\n" + "\n" + "Parameters:\n" + " - t: number of the trait whose statistics are to be computed\n" + "\n" + "Returns:\n" + " - stat: structure with mean and variance of the trait in the population\n" + "\n" + ""}, + { "haploid_highd_get_trait_covariance", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_covariance, METH_VARARGS|METH_KEYWORDS, "\n" + "Get the covariance of two traits in the population.\n" + "\n" + "Parameters:\n" + " - t1: first trait\n" + " - t2: second trait\n" + "\n" + "Returns:\n" + " - cov: the covariance of the two traits\n" + "\n" + ""}, + { "haploid_highd__update_traits", _wrap_haploid_highd__update_traits, METH_O, "_update_traits(haploid_highd self)"}, + { "haploid_highd__update_fitness", _wrap_haploid_highd__update_fitness, METH_O, "_update_fitness(haploid_highd self)"}, + { "haploid_highd_tree_sample_set", _wrap_haploid_highd_tree_sample_set, METH_VARARGS, "haploid_highd_tree_sample_set(haploid_highd self, int tree_sample)"}, + { "haploid_highd_tree_sample_get", _wrap_haploid_highd_tree_sample_get, METH_O, "haploid_highd_tree_sample_get(haploid_highd self) -> int"}, + { "haploid_highd___str__", _wrap_haploid_highd___str__, METH_O, "x.__str__() <==> str(x)"}, + { "haploid_highd___repr__", _wrap_haploid_highd___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "haploid_highd_get_clone", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_clone, METH_VARARGS|METH_KEYWORDS, "\n" + "Get a single clone\n" + "\n" + "Parameters:\n" + " - n: index of the clone\n" + "\n" + "Returns:\n" + " - clone: the n-th clone in the population\n" + "\n" + ""}, + { "haploid_highd_L_get", _wrap_haploid_highd_L_get, METH_O, "Number of loci (read-only)"}, + { "haploid_highd_number_of_loci_get", _wrap_haploid_highd_number_of_loci_get, METH_O, "Number of loci (read-only)"}, + { "haploid_highd_N_get", _wrap_haploid_highd_N_get, METH_O, "Population size (read-only)"}, + { "haploid_highd_population_size_get", _wrap_haploid_highd_population_size_get, METH_O, "Population size (read-only)"}, + { "haploid_highd_generation_set", _wrap_haploid_highd_generation_set, METH_VARARGS, "Current generation (read-only)"}, + { "haploid_highd_generation_get", _wrap_haploid_highd_generation_get, METH_O, "Current generation (read-only)"}, + { "haploid_highd_number_of_clones_get", _wrap_haploid_highd_number_of_clones_get, METH_O, "Number of non-empty clones (read-only)"}, + { "haploid_highd_number_of_traits_get", _wrap_haploid_highd_number_of_traits_get, METH_O, "Number of traits (read-only)"}, + { "haploid_highd_max_fitness_get", _wrap_haploid_highd_max_fitness_get, METH_O, "Maximal fitness in the population (read-only)"}, + { "haploid_highd_participation_ratio_get", _wrap_haploid_highd_participation_ratio_get, METH_O, "Participation ratio (read-only)"}, + { "haploid_highd__set_trait_weights", (PyCFunction)(void(*)(void))_wrap_haploid_highd__set_trait_weights, METH_VARARGS|METH_KEYWORDS, "_set_trait_weights(haploid_highd self, double * IN_ARRAY1)"}, + { "haploid_highd__get_trait_weights", (PyCFunction)(void(*)(void))_wrap_haploid_highd__get_trait_weights, METH_VARARGS|METH_KEYWORDS, "\n" + "weight of each trait on fitness\n" + "\n" + ".. note:: Fitness is updated automatically when the weights are changed.\n" + "\n" + ""}, + { "haploid_highd_set_genotypes", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_genotypes, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize population with fixed counts for specific genotypes.\n" + "\n" + "Parameters:\n" + " - genotypes: list of genotypes to set. Genotypes are lists of alleles,\n" + " e.g. [[0,0,1,0], [0,1,1,1]] for genotypes 0010 and 0111\n" + " - counts: list of the number at which each of those genotypes it to be present\n" + "\n" + ".. note:: the population size and, if unset, the carrying capacity will be set\n" + " as the sum of the counts.\n" + "\n" + "**Example**: if you want to initialize 200 individuals with genotype 001 and\n" + " 300 individuals with genotype 110, you can use\n" + " ``set_genotypes([[0,0,1], [1,1,0]], [200, 300])``\n" + "\n" + ""}, + { "haploid_highd_set_genotypes_and_ancestral_state", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_genotypes_and_ancestral_state, METH_VARARGS|METH_KEYWORDS, "\n" + "Initialize population with fixed counts for specific genotypes.\n" + "\n" + "Parameters:\n" + " - genotypes: list of genotypes to set. Genotypes are lists of alleles,\n" + " e.g. [[0,0,1,0], [0,1,1,1]] for genotypes 0010 and 0111\n" + " - counts: list of the number at which each of those genotypes it to be present\n" + " - ancestral state of the sample, a vector of 0 and 1\n" + ".. note:: the population size and, if unset, the carrying capacity will be set\n" + " as the sum of the counts.\n" + "\n" + "**Example**: if you want to initialize 200 individuals with genotype 001 and\n" + " 300 individuals with genotype 110, you can use\n" + " ``set_genotypes([[0,0,1], [1,1,0]], [200, 300])``\n" + "\n" + ""}, + { "haploid_highd__get_genealogy", _wrap_haploid_highd__get_genealogy, METH_O, "\n" + "Genealogy of the tracked loci.\n" + "\n" + ".. note:: This attribute is read-only.\n" + "\n" + ""}, + { "haploid_highd_get_allele_frequencies", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_allele_frequencies, METH_VARARGS|METH_KEYWORDS, "Get all allele frequencies"}, + { "haploid_highd_get_derived_allele_frequencies", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_derived_allele_frequencies, METH_VARARGS|METH_KEYWORDS, "Get all derived allele frequencies"}, + { "haploid_highd_get_ancestral_states", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_ancestral_states, METH_VARARGS|METH_KEYWORDS, "Get ancestral state of all loci"}, + { "haploid_highd_get_trait_additive", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_trait_additive, METH_VARARGS|METH_KEYWORDS, "\n" + "Get an array with the additive coefficients of all loci of a trait.\n" + "\n" + "Parameters:\n" + " - t: number of the trait\n" + "\n" + "Returns:\n" + " - coefficients: array of additive coefficients for the selected trait\n" + "\n" + ""}, + { "haploid_highd_set_trait_additive", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_trait_additive, METH_VARARGS|METH_KEYWORDS, "\n" + "Set the additive part of a trait\n" + "\n" + "Parameters:\n" + " - coefficients: array of coefficients for the trait (of length L). All previous additive coefficents are erased\n" + " - t: number of the trait to set\n" + "\n" + ""}, + { "haploid_highd_set_fitness_additive", (PyCFunction)(void(*)(void))_wrap_haploid_highd_set_fitness_additive, METH_VARARGS|METH_KEYWORDS, "Shortcut for set_trait_additive when there is only one trait"}, + { "haploid_highd_get_genotype", (PyCFunction)(void(*)(void))_wrap_haploid_highd_get_genotype, METH_VARARGS|METH_KEYWORDS, "get_genotype(haploid_highd self, int n) -> boost::dynamic_bitset< >"}, + { "haploid_highd__set_tree_in_genealogy", (PyCFunction)(void(*)(void))_wrap_haploid_highd__set_tree_in_genealogy, METH_VARARGS|METH_KEYWORDS, "_set_tree_in_genealogy(haploid_highd self, int locus, rooted_tree tree)"}, + { "haploid_highd__set_newGeneration_in_genealogy", (PyCFunction)(void(*)(void))_wrap_haploid_highd__set_newGeneration_in_genealogy, METH_VARARGS|METH_KEYWORDS, "_set_newGeneration_in_genealogy(haploid_highd self, int locus, vector_tree_node newGeneration)"}, + { "haploid_highd_swigregister", haploid_highd_swigregister, METH_O, NULL}, + { "haploid_highd_swiginit", haploid_highd_swiginit, METH_VARARGS, NULL}, + { "hivgene_start_set", _wrap_hivgene_start_set, METH_VARARGS, "Initial position of the gene"}, + { "hivgene_start_get", _wrap_hivgene_start_get, METH_O, "Initial position of the gene"}, + { "hivgene_end_set", _wrap_hivgene_end_set, METH_VARARGS, "Final position of the gene"}, + { "hivgene_end_get", _wrap_hivgene_end_get, METH_O, "Final position of the gene"}, + { "hivgene_second_start_set", _wrap_hivgene_second_start_set, METH_VARARGS, "hivgene_second_start_set(hivgene self, unsigned int second_start)"}, + { "hivgene_second_start_get", _wrap_hivgene_second_start_get, METH_O, "hivgene_second_start_get(hivgene self) -> unsigned int"}, + { "hivgene_second_end_set", _wrap_hivgene_second_end_set, METH_VARARGS, "hivgene_second_end_set(hivgene self, unsigned int second_end)"}, + { "hivgene_second_end_get", _wrap_hivgene_second_end_get, METH_O, "hivgene_second_end_get(hivgene self) -> unsigned int"}, + { "new_hivgene", (PyCFunction)(void(*)(void))_wrap_new_hivgene, METH_VARARGS|METH_KEYWORDS, "Structure for an HIV gene."}, + { "hivgene___str__", _wrap_hivgene___str__, METH_O, "x.__str__() <==> str(x)"}, + { "hivgene___repr__", _wrap_hivgene___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "delete_hivgene", _wrap_delete_hivgene, METH_O, "delete_hivgene(hivgene self)"}, + { "hivgene_swigregister", hivgene_swigregister, METH_O, NULL}, + { "hivgene_swiginit", hivgene_swiginit, METH_VARARGS, NULL}, + { "new_hivpopulation", (PyCFunction)(void(*)(void))_wrap_new_hivpopulation, METH_VARARGS|METH_KEYWORDS, "\n" + "Construct a HIV population with certain parameters.\n" + "\n" + "Parameters:\n" + "\n" + " - N number of viral particles\n" + " - rng_seed seed for the random number generator. If this is 0, time(NULL)+getpid() is used.\n" + " - mutation_rate mutation rate in events / generation / site\n" + " - coinfection_rate probability of coinfection of the same cell by two viral particles in events / generation\n" + " - crossover_rate probability of template switching during coinfection in events / site\n" + "\n" + ".. note:: the genome length is 10000 (see HIVGENOME).\n" + "\n" + ""}, + { "delete_hivpopulation", _wrap_delete_hivpopulation, METH_O, "delete_hivpopulation(hivpopulation self)"}, + { "hivpopulation_gag_set", _wrap_hivpopulation_gag_set, METH_VARARGS, "hivpopulation_gag_set(hivpopulation self, hivgene gag)"}, + { "hivpopulation_gag_get", _wrap_hivpopulation_gag_get, METH_O, "hivpopulation_gag_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_pol_set", _wrap_hivpopulation_pol_set, METH_VARARGS, "hivpopulation_pol_set(hivpopulation self, hivgene pol)"}, + { "hivpopulation_pol_get", _wrap_hivpopulation_pol_get, METH_O, "hivpopulation_pol_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_env_set", _wrap_hivpopulation_env_set, METH_VARARGS, "hivpopulation_env_set(hivpopulation self, hivgene env)"}, + { "hivpopulation_env_get", _wrap_hivpopulation_env_get, METH_O, "hivpopulation_env_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_nef_set", _wrap_hivpopulation_nef_set, METH_VARARGS, "hivpopulation_nef_set(hivpopulation self, hivgene nef)"}, + { "hivpopulation_nef_get", _wrap_hivpopulation_nef_get, METH_O, "hivpopulation_nef_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_vif_set", _wrap_hivpopulation_vif_set, METH_VARARGS, "hivpopulation_vif_set(hivpopulation self, hivgene vif)"}, + { "hivpopulation_vif_get", _wrap_hivpopulation_vif_get, METH_O, "hivpopulation_vif_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_vpu_set", _wrap_hivpopulation_vpu_set, METH_VARARGS, "hivpopulation_vpu_set(hivpopulation self, hivgene vpu)"}, + { "hivpopulation_vpu_get", _wrap_hivpopulation_vpu_get, METH_O, "hivpopulation_vpu_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_vpr_set", _wrap_hivpopulation_vpr_set, METH_VARARGS, "hivpopulation_vpr_set(hivpopulation self, hivgene vpr)"}, + { "hivpopulation_vpr_get", _wrap_hivpopulation_vpr_get, METH_O, "hivpopulation_vpr_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_tat_set", _wrap_hivpopulation_tat_set, METH_VARARGS, "hivpopulation_tat_set(hivpopulation self, hivgene tat)"}, + { "hivpopulation_tat_get", _wrap_hivpopulation_tat_get, METH_O, "hivpopulation_tat_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_rev_set", _wrap_hivpopulation_rev_set, METH_VARARGS, "hivpopulation_rev_set(hivpopulation self, hivgene rev)"}, + { "hivpopulation_rev_get", _wrap_hivpopulation_rev_get, METH_O, "hivpopulation_rev_get(hivpopulation self) -> hivgene"}, + { "hivpopulation_read_replication_coefficients", (PyCFunction)(void(*)(void))_wrap_hivpopulation_read_replication_coefficients, METH_VARARGS|METH_KEYWORDS, "\n" + "Read replication coefficients from a text file\n" + "\n" + "Parameters:\n" + " - filename: string with the name of the file to read the coefficients from\n" + "\n" + ""}, + { "hivpopulation_read_resistance_coefficients", (PyCFunction)(void(*)(void))_wrap_hivpopulation_read_resistance_coefficients, METH_VARARGS|METH_KEYWORDS, "\n" + "Read resistance coefficients from a text file\n" + "\n" + "Parameters:\n" + " - filename: string with the name of the file to read the coefficients from\n" + "\n" + ""}, + { "hivpopulation_write_genotypes", (PyCFunction)(void(*)(void))_wrap_hivpopulation_write_genotypes, METH_VARARGS|METH_KEYWORDS, "\n" + "Store random genotypes into a plain text file.\n" + "\n" + "Parameters:\n" + " - filename: string with the name of the file to store the genotype into\n" + " - sample_size: how many random genotypes to store\n" + " - gt_label: common fasta label for the genotypes (e.g. 'HIV-sim')\n" + " - start: if only a portion of the genome is to be stored, start from this position\n" + " - length: store a chunk from ``start`` to this length\n" + "\n" + ""}, + { "hivpopulation___str__", _wrap_hivpopulation___str__, METH_O, "x.__str__() <==> str(x)"}, + { "hivpopulation___repr__", _wrap_hivpopulation___repr__, METH_O, "x.__repr__() <==> repr(x)"}, + { "hivpopulation_treatment_set", _wrap_hivpopulation_treatment_set, METH_VARARGS, "\n" + "Treatment weight (between 0 and 1)\n" + "\n" + ".. note:: this variable controls how important is either of the two phenotypic\n" + " traits, replication and resistance. Their contribution to fitness is\n" + " always linear (in this implementation).\n" + "\n" + ""}, + { "hivpopulation_treatment_get", _wrap_hivpopulation_treatment_get, METH_O, "\n" + "Treatment weight (between 0 and 1)\n" + "\n" + ".. note:: this variable controls how important is either of the two phenotypic\n" + " traits, replication and resistance. Their contribution to fitness is\n" + " always linear (in this implementation).\n" + "\n" + ""}, + { "hivpopulation_swigregister", hivpopulation_swigregister, METH_O, NULL}, + { "hivpopulation_swiginit", hivpopulation_swiginit, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_hivpopulationTo_p_haploid_highd(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((haploid_highd *) ((hivpopulation *) x)); +} +static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_clone_t = {"_p_clone_t", "clone_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_edge_t = {"_p_edge_t", "std::map< tree_key_t,edge_t >::mapped_type *|edge_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_genotype_value_pair_t = {"_p_genotype_value_pair_t", "genotype_value_pair_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_haploid_highd = {"_p_haploid_highd", "haploid_highd *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_haploid_lowd = {"_p_haploid_lowd", "haploid_lowd *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_hivgene = {"_p_hivgene", "hivgene *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_hivpopulation = {"_p_hivpopulation", "hivpopulation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_index_value_pair_t = {"_p_index_value_pair_t", "index_value_pair_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_istream = {"_p_istream", "istream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_key_type = {"_p_key_type", "key_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_mapped_type = {"_p_mapped_type", "mapped_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_multi_locus_genealogy = {"_p_multi_locus_genealogy", "multi_locus_genealogy *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_node_t = {"_p_node_t", "std::map< tree_key_t,node_t >::mapped_type *|std::vector< node_t >::value_type *|node_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ostream = {"_p_ostream", "ostream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_poly_t = {"_p_poly_t", "std::vector< poly_t >::value_type *|poly_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_rooted_tree = {"_p_rooted_tree", "rooted_tree *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_stat_t = {"_p_stat_t", "stat_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_int_t = {"_p_std__allocatorT_int_t", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_node_t_t = {"_p_std__allocatorT_node_t_t", "std::vector< node_t >::allocator_type *|std::allocator< node_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_poly_t_t = {"_p_std__allocatorT_poly_t_t", "std::vector< poly_t >::allocator_type *|std::allocator< poly_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_tree_key_t_const_edge_t_t_t = {"_p_std__allocatorT_std__pairT_tree_key_t_const_edge_t_t_t", "std::map< tree_key_t,edge_t >::allocator_type *|std::allocator< std::pair< tree_key_t const,edge_t > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_std__pairT_tree_key_t_const_node_t_t_t = {"_p_std__allocatorT_std__pairT_tree_key_t_const_node_t_t_t", "std::map< tree_key_t,node_t >::allocator_type *|std::allocator< std::pair< tree_key_t const,node_t > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_step_t_t = {"_p_std__allocatorT_step_t_t", "std::vector< step_t >::allocator_type *|std::allocator< step_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__allocatorT_tree_key_t_t = {"_p_std__allocatorT_tree_key_t_t", "std::list< tree_key_t >::allocator_type *|std::vector< tree_key_t >::allocator_type *|std::allocator< tree_key_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__lessT_tree_key_t_t = {"_p_std__lessT_tree_key_t_t", "std::less< tree_key_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__listT_tree_key_t_t = {"_p_std__listT_tree_key_t_t", "list< tree_key_t > *|std::list< tree_key_t,std::allocator< tree_key_t > > *|std::list< tree_key_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_tree_key_t_edge_t_t = {"_p_std__mapT_tree_key_t_edge_t_t", "map< tree_key_t,edge_t > *|std::map< tree_key_t,edge_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,edge_t > > > *|std::map< tree_key_t,edge_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_tree_key_t_node_t_t = {"_p_std__mapT_tree_key_t_node_t_t", "map< tree_key_t,node_t > *|std::map< tree_key_t,node_t,std::less< tree_key_t >,std::allocator< std::pair< tree_key_t const,node_t > > > *|std::map< tree_key_t,node_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_int_t = {"_p_std__vectorT_int_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_node_t_t = {"_p_std__vectorT_node_t_t", "std::vector< node_t,std::allocator< node_t > > *|std::vector< node_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_poly_t_t = {"_p_std__vectorT_poly_t_t", "std::vector< poly_t,std::allocator< poly_t > > *|std::vector< poly_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_step_t_t = {"_p_std__vectorT_step_t_t", "std::vector< step_t,std::allocator< step_t > > *|vector< step_t > *|std::vector< step_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_tree_key_t_t = {"_p_std__vectorT_tree_key_t_t", "std::vector< tree_key_t,std::allocator< tree_key_t > > *|vector< tree_key_t > *|std::vector< tree_key_t > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_step_t = {"_p_step_t", "std::vector< step_t >::value_type *|step_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_tree_key_t = {"_p_tree_key_t", "std::list< tree_key_t >::value_type *|std::map< tree_key_t,edge_t >::key_type *|std::map< tree_key_t,node_t >::key_type *|std::vector< tree_key_t >::value_type *|tree_key_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_allocator_type, + &_swigt__p_char, + &_swigt__p_clone_t, + &_swigt__p_difference_type, + &_swigt__p_double, + &_swigt__p_edge_t, + &_swigt__p_genotype_value_pair_t, + &_swigt__p_haploid_highd, + &_swigt__p_haploid_lowd, + &_swigt__p_hivgene, + &_swigt__p_hivpopulation, + &_swigt__p_index_value_pair_t, + &_swigt__p_int, + &_swigt__p_istream, + &_swigt__p_key_type, + &_swigt__p_mapped_type, + &_swigt__p_multi_locus_genealogy, + &_swigt__p_node_t, + &_swigt__p_ostream, + &_swigt__p_p_PyObject, + &_swigt__p_poly_t, + &_swigt__p_rooted_tree, + &_swigt__p_size_type, + &_swigt__p_stat_t, + &_swigt__p_std__allocatorT_int_t, + &_swigt__p_std__allocatorT_node_t_t, + &_swigt__p_std__allocatorT_poly_t_t, + &_swigt__p_std__allocatorT_std__pairT_tree_key_t_const_edge_t_t_t, + &_swigt__p_std__allocatorT_std__pairT_tree_key_t_const_node_t_t_t, + &_swigt__p_std__allocatorT_step_t_t, + &_swigt__p_std__allocatorT_tree_key_t_t, + &_swigt__p_std__invalid_argument, + &_swigt__p_std__lessT_tree_key_t_t, + &_swigt__p_std__listT_tree_key_t_t, + &_swigt__p_std__mapT_tree_key_t_edge_t_t, + &_swigt__p_std__mapT_tree_key_t_node_t_t, + &_swigt__p_std__vectorT_int_t, + &_swigt__p_std__vectorT_node_t_t, + &_swigt__p_std__vectorT_poly_t_t, + &_swigt__p_std__vectorT_step_t_t, + &_swigt__p_std__vectorT_tree_key_t_t, + &_swigt__p_step_t, + &_swigt__p_swig__SwigPyIterator, + &_swigt__p_tree_key_t, + &_swigt__p_value_type, +}; + +static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_clone_t[] = { {&_swigt__p_clone_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_edge_t[] = { {&_swigt__p_edge_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_genotype_value_pair_t[] = { {&_swigt__p_genotype_value_pair_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_haploid_highd[] = { {&_swigt__p_haploid_highd, 0, 0, 0}, {&_swigt__p_hivpopulation, _p_hivpopulationTo_p_haploid_highd, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_haploid_lowd[] = { {&_swigt__p_haploid_lowd, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_hivgene[] = { {&_swigt__p_hivgene, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_hivpopulation[] = { {&_swigt__p_hivpopulation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_index_value_pair_t[] = { {&_swigt__p_index_value_pair_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_istream[] = { {&_swigt__p_istream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_key_type[] = { {&_swigt__p_key_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_mapped_type[] = { {&_swigt__p_mapped_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_multi_locus_genealogy[] = { {&_swigt__p_multi_locus_genealogy, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_node_t[] = { {&_swigt__p_node_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ostream[] = { {&_swigt__p_ostream, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_poly_t[] = { {&_swigt__p_poly_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_rooted_tree[] = { {&_swigt__p_rooted_tree, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_stat_t[] = { {&_swigt__p_stat_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_int_t[] = { {&_swigt__p_std__allocatorT_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_node_t_t[] = { {&_swigt__p_std__allocatorT_node_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_poly_t_t[] = { {&_swigt__p_std__allocatorT_poly_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_tree_key_t_const_edge_t_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_tree_key_t_const_edge_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_std__pairT_tree_key_t_const_node_t_t_t[] = { {&_swigt__p_std__allocatorT_std__pairT_tree_key_t_const_node_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_step_t_t[] = { {&_swigt__p_std__allocatorT_step_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__allocatorT_tree_key_t_t[] = { {&_swigt__p_std__allocatorT_tree_key_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__lessT_tree_key_t_t[] = { {&_swigt__p_std__lessT_tree_key_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__listT_tree_key_t_t[] = { {&_swigt__p_std__listT_tree_key_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_tree_key_t_edge_t_t[] = { {&_swigt__p_std__mapT_tree_key_t_edge_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_tree_key_t_node_t_t[] = { {&_swigt__p_std__mapT_tree_key_t_node_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_int_t[] = { {&_swigt__p_std__vectorT_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_node_t_t[] = { {&_swigt__p_std__vectorT_node_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_poly_t_t[] = { {&_swigt__p_std__vectorT_poly_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_step_t_t[] = { {&_swigt__p_std__vectorT_step_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_tree_key_t_t[] = { {&_swigt__p_std__vectorT_tree_key_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_step_t[] = { {&_swigt__p_step_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_tree_key_t[] = { {&_swigt__p_tree_key_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_allocator_type, + _swigc__p_char, + _swigc__p_clone_t, + _swigc__p_difference_type, + _swigc__p_double, + _swigc__p_edge_t, + _swigc__p_genotype_value_pair_t, + _swigc__p_haploid_highd, + _swigc__p_haploid_lowd, + _swigc__p_hivgene, + _swigc__p_hivpopulation, + _swigc__p_index_value_pair_t, + _swigc__p_int, + _swigc__p_istream, + _swigc__p_key_type, + _swigc__p_mapped_type, + _swigc__p_multi_locus_genealogy, + _swigc__p_node_t, + _swigc__p_ostream, + _swigc__p_p_PyObject, + _swigc__p_poly_t, + _swigc__p_rooted_tree, + _swigc__p_size_type, + _swigc__p_stat_t, + _swigc__p_std__allocatorT_int_t, + _swigc__p_std__allocatorT_node_t_t, + _swigc__p_std__allocatorT_poly_t_t, + _swigc__p_std__allocatorT_std__pairT_tree_key_t_const_edge_t_t_t, + _swigc__p_std__allocatorT_std__pairT_tree_key_t_const_node_t_t_t, + _swigc__p_std__allocatorT_step_t_t, + _swigc__p_std__allocatorT_tree_key_t_t, + _swigc__p_std__invalid_argument, + _swigc__p_std__lessT_tree_key_t_t, + _swigc__p_std__listT_tree_key_t_t, + _swigc__p_std__mapT_tree_key_t_edge_t_t, + _swigc__p_std__mapT_tree_key_t_node_t_t, + _swigc__p_std__vectorT_int_t, + _swigc__p_std__vectorT_node_t_t, + _swigc__p_std__vectorT_poly_t_t, + _swigc__p_std__vectorT_step_t_t, + _swigc__p_std__vectorT_tree_key_t_t, + _swigc__p_step_t, + _swigc__p_swig__SwigPyIterator, + _swigc__p_tree_key_t, + _swigc__p_value_type, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; + +#ifdef __cplusplus +} +#endif +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned statically to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + +#ifndef SWIG_INIT_CLIENT_DATA_TYPE +#define SWIG_INIT_CLIENT_DATA_TYPE void * +#endif + +SWIGRUNTIME void +SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int init; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + iter=module_head; + do { + if (iter==&swig_module) { + /* Our module is already in the list, so there's nothing more to do. */ + return; + } + iter=iter->next; + } while (iter!= module_head); + + /* otherwise we must add our module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpreters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + SWIG_Py_DECREF(obj); + } + } + } + + /* ----------------------------------------------------------------------------- + * Patch %callback methods' docstrings to hold the callback ptrs + * -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, const swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (!c) continue; + c = strstr(c, "swig_ptr: "); + if (c) { + int j; + const swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + memcpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + memcpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + +#ifdef __cplusplus +} +#endif + + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* ----------------------------------------------------------------------------- + * Method creation and docstring support functions + * ----------------------------------------------------------------------------- */ + + /* ----------------------------------------------------------------------------- + * Function to find the method definition with the correct docstring for the + * proxy module as opposed to the low-level API + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) { + /* Find the function in the modified method table */ + size_t offset = 0; + int found = 0; + while (SwigMethods_proxydocs[offset].ml_meth != NULL) { + if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) { + found = 1; + break; + } + offset++; + } + /* Use the copy with the modified docstring if available */ + return found ? &SwigMethods_proxydocs[offset] : NULL; + } + + /* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { + if (PyCFunction_Check(func)) { + PyCFunctionObject *funcobj = (PyCFunctionObject *)func; + PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); + if (ml) + func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); + } +#if PY_VERSION_HEX >= 0x03000000 + return PyInstanceMethod_New(func); +#else + return PyMethod_New(func, NULL, NULL); +#endif + } + + /* ----------------------------------------------------------------------------- + * Wrapper of PyStaticMethod_New() + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ + + SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) { + if (PyCFunction_Check(func)) { + PyCFunctionObject *funcobj = (PyCFunctionObject *)func; + PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name); + if (ml) + func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module); + } + return PyStaticMethod_New(func); + } + +#ifdef __cplusplus +} +#endif + + + + +/* -----------------------------------------------------------------------------* + * Partial Init method + * -----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +#endif + +SWIGEXPORT +#if PY_VERSION_HEX >= 0x03000000 +PyObject* +#else +void +#endif +SWIG_init(void) { + PyObject *m, *d, *md, *globals; + +#if PY_VERSION_HEX >= 0x03000000 + static struct PyModuleDef SWIG_module = { + PyModuleDef_HEAD_INIT, + SWIG_name, + NULL, + -1, + SwigMethods, + NULL, + NULL, + NULL, + NULL + }; +#endif + +#if defined(SWIGPYTHON_BUILTIN) + static SwigPyClientData SwigPyObject_clientdata = { + 0, 0, 0, 0, 0, 0, 0 + }; + static PyGetSetDef this_getset_def = { + (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL + }; + static SwigPyGetSet thisown_getset_closure = { + SwigPyObject_own, + SwigPyObject_own + }; + static PyGetSetDef thisown_getset_def = { + (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure + }; + PyTypeObject *builtin_pytype; + int builtin_base_count; + swig_type_info *builtin_basetype; + PyObject *tuple; + PyGetSetDescrObject *static_getset; + PyTypeObject *metatype; + PyTypeObject *swigpyobject; + SwigPyClientData *cd; + PyObject *public_interface, *public_symbol; + PyObject *this_descr; + PyObject *thisown_descr; + PyObject *self = 0; + int i; + + (void)builtin_pytype; + (void)builtin_base_count; + (void)builtin_basetype; + (void)tuple; + (void)static_getset; + (void)self; + + /* Metaclass is used to implement static member variables */ + metatype = SwigPyObjectType(); + assert(metatype); +#endif + + (void)globals; + + /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */ + SWIG_This(); + SWIG_Python_TypeCache(); + SwigPyPacked_type(); +#ifndef SWIGPYTHON_BUILTIN + SwigPyObject_type(); +#endif + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + +#if PY_VERSION_HEX >= 0x03000000 + m = PyModule_Create(&SWIG_module); +#else + m = Py_InitModule(SWIG_name, SwigMethods); +#endif + + md = d = PyModule_GetDict(m); + (void)md; + + SWIG_InitializeModule(0); + +#ifdef SWIGPYTHON_BUILTIN + swigpyobject = SwigPyObject_TypeOnce(); + + SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + if (!cd) { + SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; + SwigPyObject_clientdata.pytype = swigpyobject; + } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { + PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); +# if PY_VERSION_HEX >= 0x03000000 + return NULL; +# else + return; +# endif + } + + /* All objects have a 'this' attribute */ + this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); + (void)this_descr; + + /* All objects have a 'thisown' attribute */ + thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); + (void)thisown_descr; + + public_interface = PyList_New(0); + public_symbol = 0; + (void)public_symbol; + + PyDict_SetItemString(md, "__all__", public_interface); + SWIG_Py_DECREF(public_interface); + for (i = 0; SwigMethods[i].ml_name != NULL; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); + for (i = 0; swig_const_table[i].name != 0; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); +#endif + + SWIG_InstallConstants(d,swig_const_table); + + + import_array(); + + + // thread safe initialization + swig::container_owner_attribute(); + + SWIG_Python_SetConstant(d, "FREE_RECOMBINATION",SWIG_From_int(static_cast< int >(1))); + SWIG_Python_SetConstant(d, "CROSSOVERS",SWIG_From_int(static_cast< int >(2))); + SWIG_Python_SetConstant(d, "SINGLE_CROSSOVER",SWIG_From_int(static_cast< int >(3))); + SWIG_Python_SetConstant(d, "HC_MEMERR",SWIG_From_int(static_cast< int >(-131545))); + SWIG_Python_SetConstant(d, "HC_BADARG",SWIG_From_int(static_cast< int >(-131546))); + SWIG_Python_SetConstant(d, "HC_VERBOSE",SWIG_From_int(static_cast< int >(0))); + SWIG_Python_SetConstant(d, "HC_FUNC",SWIG_From_int(static_cast< int >(1))); + SWIG_Python_SetConstant(d, "HC_COEFF",SWIG_From_int(static_cast< int >(-1))); + SWIG_Python_SetConstant(d, "HC_FUNC_EQ_COEFF",SWIG_From_int(static_cast< int >(0))); + SWIG_Python_SetConstant(d, "HG_VERBOSE",SWIG_From_int(static_cast< int >(0))); + SWIG_Python_SetConstant(d, "HG_LONGTIMEGEN",SWIG_From_int(static_cast< int >(1000000))); + SWIG_Python_SetConstant(d, "HG_CONTINUOUS",SWIG_From_int(static_cast< int >(10000))); + SWIG_Python_SetConstant(d, "HG_NOTHING",SWIG_From_double(static_cast< double >(1e-15))); + SWIG_Python_SetConstant(d, "HG_EXTINCT",SWIG_From_int(static_cast< int >(-9287465))); + SWIG_Python_SetConstant(d, "HG_BADARG",SWIG_From_int(static_cast< int >(-879564))); + SWIG_Python_SetConstant(d, "HG_MEMERR",SWIG_From_int(static_cast< int >(-32656845))); + SWIG_Python_SetConstant(d, "HCF_MEMERR",SWIG_From_int(static_cast< int >(-131545))); + SWIG_Python_SetConstant(d, "HCF_BADARG",SWIG_From_int(static_cast< int >(-131546))); + SWIG_Python_SetConstant(d, "HCF_VERBOSE",SWIG_From_int(static_cast< int >(0))); + SWIG_Python_SetConstant(d, "WORDLENGTH",SWIG_From_int(static_cast< int >(28))); + SWIG_Python_SetConstant(d, "HP_VERBOSE",SWIG_From_int(static_cast< int >(0))); + SWIG_Python_SetConstant(d, "NO_GENOTYPE",SWIG_From_int(static_cast< int >(-1))); + SWIG_Python_SetConstant(d, "HP_MINAF",SWIG_From_double(static_cast< double >(0.02))); + SWIG_Python_SetConstant(d, "MAX_DELTAFITNESS",SWIG_From_int(static_cast< int >(8))); + SWIG_Python_SetConstant(d, "MAX_POPSIZE",SWIG_From_int(static_cast< int >(500000))); + SWIG_Python_SetConstant(d, "HP_NOTHING",SWIG_From_double(static_cast< double >(1e-12))); + SWIG_Python_SetConstant(d, "HP_RANDOM_SAMPLE_FRAC",SWIG_From_double(static_cast< double >(0.01))); + SWIG_Python_SetConstant(d, "HP_VERY_NEGATIVE",SWIG_From_double(static_cast< double >(-1e15))); + SWIG_Python_SetConstant(d, "HP_BADARG",SWIG_From_int(static_cast< int >(-879564))); + SWIG_Python_SetConstant(d, "HP_MEMERR",SWIG_From_int(static_cast< int >(-986465))); + SWIG_Python_SetConstant(d, "HP_EXPLOSIONWARN",SWIG_From_int(static_cast< int >(4))); + SWIG_Python_SetConstant(d, "HP_EXTINCTERR",SWIG_From_int(static_cast< int >(5))); + SWIG_Python_SetConstant(d, "HP_NOBINSERR",SWIG_From_int(static_cast< int >(6))); + SWIG_Python_SetConstant(d, "HP_WRONGBINSERR",SWIG_From_int(static_cast< int >(7))); + SWIG_Python_SetConstant(d, "HP_RUNTIMEERR",SWIG_From_int(static_cast< int >(8))); + SWIG_Python_SetConstant(d, "RT_VERBOSE",SWIG_From_int(static_cast< int >(0))); + SWIG_Python_SetConstant(d, "RT_VERYLARGE",SWIG_From_int(static_cast< int >(10000000))); + SWIG_Python_SetConstant(d, "RT_CHILDNOTFOUND",SWIG_From_int(static_cast< int >(-35343))); + SWIG_Python_SetConstant(d, "RT_NODENOTFOUND",SWIG_From_int(static_cast< int >(-35765))); + SWIG_Python_SetConstant(d, "RT_LOCUSNOTFOUND",SWIG_From_int(static_cast< int >(-35762))); + SWIG_Python_SetConstant(d, "RT_FITNESS_MISSING",SWIG_From_int(static_cast< int >(-35722))); + SWIG_Python_SetConstant(d, "RT_CROSSOVER_MISSING",SWIG_From_int(static_cast< int >(-35721))); + SWIG_Python_SetConstant(d, "RT_SEGMENT_MISSING",SWIG_From_int(static_cast< int >(-35720))); + SWIG_Python_SetConstant(d, "RT_ERROR_PARSING",SWIG_From_int(static_cast< int >(1))); + SWIG_Python_SetConstant(d, "HIVPOP_VERBOSE",SWIG_From_int(static_cast< int >(0))); + SWIG_Python_SetConstant(d, "HIVPOP_BADARG",SWIG_From_int(static_cast< int >(-1354341))); + SWIG_Python_SetConstant(d, "NOTHING",SWIG_From_double(static_cast< double >(1e-10))); + SWIG_Python_SetConstant(d, "HIVGENOME",SWIG_From_int(static_cast< int >(10000))); + SWIG_Python_SetConstant(d, "GAG_START",SWIG_From_int(static_cast< int >(789))); + SWIG_Python_SetConstant(d, "GAG_END",SWIG_From_int(static_cast< int >(2292))); + SWIG_Python_SetConstant(d, "POL_START",SWIG_From_int(static_cast< int >(2087))); + SWIG_Python_SetConstant(d, "POL_END",SWIG_From_int(static_cast< int >(5096))); + SWIG_Python_SetConstant(d, "ENV_START",SWIG_From_int(static_cast< int >(6314))); + SWIG_Python_SetConstant(d, "ENV_END",SWIG_From_int(static_cast< int >(8795))); + SWIG_Python_SetConstant(d, "NEF_START",SWIG_From_int(static_cast< int >(8796))); + SWIG_Python_SetConstant(d, "NEF_END",SWIG_From_int(static_cast< int >(9417))); + SWIG_Python_SetConstant(d, "VIF_START",SWIG_From_int(static_cast< int >(5040))); + SWIG_Python_SetConstant(d, "VIF_END",SWIG_From_int(static_cast< int >(5619))); + SWIG_Python_SetConstant(d, "VPR_START",SWIG_From_int(static_cast< int >(5558))); + SWIG_Python_SetConstant(d, "VPR_END",SWIG_From_int(static_cast< int >(5850))); + SWIG_Python_SetConstant(d, "VPU_START",SWIG_From_int(static_cast< int >(6061))); + SWIG_Python_SetConstant(d, "VPU_END",SWIG_From_int(static_cast< int >(6310))); + SWIG_Python_SetConstant(d, "REV1_START",SWIG_From_int(static_cast< int >(5969))); + SWIG_Python_SetConstant(d, "REV1_END",SWIG_From_int(static_cast< int >(6045))); + SWIG_Python_SetConstant(d, "REV2_START",SWIG_From_int(static_cast< int >(8378))); + SWIG_Python_SetConstant(d, "REV2_END",SWIG_From_int(static_cast< int >(8653))); + SWIG_Python_SetConstant(d, "TAT1_START",SWIG_From_int(static_cast< int >(5830))); + SWIG_Python_SetConstant(d, "TAT1_END",SWIG_From_int(static_cast< int >(6045))); + SWIG_Python_SetConstant(d, "TAT2_START",SWIG_From_int(static_cast< int >(8378))); + SWIG_Python_SetConstant(d, "TAT2_END",SWIG_From_int(static_cast< int >(8469))); +#if PY_VERSION_HEX >= 0x03000000 + return m; +#else + return; +#endif +} + diff --git a/src/python/numpy.i b/src/python/numpy.i index d4c54c8..a782174 100644 --- a/src/python/numpy.i +++ b/src/python/numpy.i @@ -1993,7 +1993,7 @@ %typemap(argout) (DATA_TYPE ARGOUT_ARRAY1[ANY]) { - $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); + $result = SWIG_Python_AppendOutput($result, (PyObject*)array$argnum, 1); } /* Typemap suite for (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) @@ -2022,7 +2022,7 @@ %typemap(argout) (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) { - $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); + $result = SWIG_Python_AppendOutput($result, (PyObject*)array$argnum, 1); } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) @@ -2051,7 +2051,7 @@ %typemap(argout) (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) { - $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); + $result = SWIG_Python_AppendOutput($result, (PyObject*)array$argnum, 1); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) @@ -2069,7 +2069,7 @@ %typemap(argout) (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) { - $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); + $result = SWIG_Python_AppendOutput($result, (PyObject*)array$argnum, 1); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) @@ -2087,7 +2087,7 @@ %typemap(argout) (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) { - $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); + $result = SWIG_Python_AppendOutput($result, (PyObject*)array$argnum, 1); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) @@ -2105,7 +2105,7 @@ %typemap(argout) (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) { - $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); + $result = SWIG_Python_AppendOutput($result, (PyObject*)array$argnum, 1); } /*****************************/ @@ -2130,7 +2130,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) @@ -2151,7 +2151,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) @@ -2173,7 +2173,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) @@ -2195,7 +2195,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) @@ -2217,7 +2217,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) @@ -2239,7 +2239,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, @@ -2263,7 +2263,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, @@ -2287,7 +2287,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, @@ -2311,7 +2311,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, @@ -2335,7 +2335,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, @@ -2360,7 +2360,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, @@ -2385,7 +2385,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, @@ -2410,7 +2410,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, @@ -2435,7 +2435,7 @@ PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /*************************************/ @@ -2473,7 +2473,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) @@ -2507,7 +2507,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) @@ -2542,7 +2542,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) @@ -2577,7 +2577,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) @@ -2612,7 +2612,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) @@ -2647,7 +2647,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, @@ -2684,7 +2684,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, @@ -2721,7 +2721,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, @@ -2758,7 +2758,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, @@ -2795,7 +2795,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, @@ -2833,7 +2833,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, @@ -2871,7 +2871,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, @@ -2909,7 +2909,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, @@ -2947,7 +2947,7 @@ PyArray_SetBaseObject(array,cap); %#endif - $result = SWIG_Python_AppendOutput($result,obj); + $result = SWIG_Python_AppendOutput($result, obj, 1); } /**************************************/