/* Generated by Cython 0.29.27 */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_27"
#define CYTHON_HEX_VERSION 0x001D1BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(U other) { return *ptr == other; }
    template<typename U> bool operator !=(U other) { return *ptr != other; }
  private:
    T *ptr;
};

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if defined(PyUnicode_IS_READY)
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #else
  #define __Pyx_PyUnicode_READY(op)       (0)
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  #endif
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__geodesic_chenhan
#define __PYX_HAVE_API__geodesic_chenhan
/* Early includes */
#include <string.h>
#include <string>
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <utility>

    #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)
    // move should be defined for these versions of MSVC, but __cplusplus isn't set usefully
    #include <type_traits>

    namespace cython_std {
    template <typename T> typename std::remove_reference<T>::type&& move(T& t) noexcept { return std::move(t); }
    template <typename T> typename std::remove_reference<T>::type&& move(T&& t) noexcept { return std::move(t); }
    }

    #endif
    
#include <set>
#include <vector>
#include <map>
#include "autowrap_tools.hpp"
#include "boost/smart_ptr/shared_ptr.hpp"
#include "Point3D.hpp"
#include "BaseModel.hpp"
#include "RichModel.hpp"
#include "ExactMethodForDGP.hpp"
#include "PreviousCH.hpp"
#include "ImprovedCHWithEdgeValve.hpp"
#include "ICHWithFurtherPriorityQueue.hpp"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 1
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING "ascii"
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "stringsource",
  "src/geodesic_chenhan.pyx",
};

/*--- Type declarations ---*/
struct __pyx_obj_16geodesic_chenhan_CBaseModel;
struct __pyx_obj_16geodesic_chenhan_CEdge;
struct __pyx_obj_16geodesic_chenhan_CFace;
struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue;
struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve;
struct __pyx_obj_16geodesic_chenhan_CPoint3D;
struct __pyx_obj_16geodesic_chenhan_CPreviousCH;
struct __pyx_obj_16geodesic_chenhan_CRichModel;
struct __pyx_obj_16geodesic_chenhan_EdgePoint;
struct __pyx_obj_16geodesic_chenhan_InfoAtVertex;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr;
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr;

/* "geodesic_chenhan.pyx":34
 *     char * _cast_const_away(char *)
 * 
 * cdef class CBaseModel:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _CBaseModel
 */
struct __pyx_obj_16geodesic_chenhan_CBaseModel {
  PyObject_HEAD
  boost::shared_ptr<CBaseModel>  inst;
};


/* "geodesic_chenhan.pyx":92
 *         return py_result
 * 
 * cdef class CEdge:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _CEdge
 */
struct __pyx_obj_16geodesic_chenhan_CEdge {
  PyObject_HEAD
  boost::shared_ptr<CEdge>  inst;
};


/* "geodesic_chenhan.pyx":213
 *                raise Exception('can not handle type of %s' % (args,))
 * 
 * cdef class CFace:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _CFace
 */
struct __pyx_obj_16geodesic_chenhan_CFace {
  PyObject_HEAD
  boost::shared_ptr<CFace>  inst;
};


/* "geodesic_chenhan.pyx":260
 *         self.inst.get().setIndices((<int>in_0), (<int>in_1), (<int>in_2))
 * 
 * cdef class CICHWithFurtherPriorityQueue:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _CICHWithFurtherPriorityQueue
 */
struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue {
  PyObject_HEAD
  boost::shared_ptr<CICHWithFurtherPriorityQueue>  inst;
};


/* "geodesic_chenhan.pyx":374
 *         return py_result
 * 
 * cdef class CImprovedCHWithEdgeValve:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _CImprovedCHWithEdgeValve
 */
struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve {
  PyObject_HEAD
  boost::shared_ptr<CImprovedCHWithEdgeValve>  inst;
};


/* "geodesic_chenhan.pyx":488
 *         return py_result
 * 
 * cdef class CPoint3D:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _CPoint3D
 */
struct __pyx_obj_16geodesic_chenhan_CPoint3D {
  PyObject_HEAD
  boost::shared_ptr<CPoint3D>  inst;
};


/* "geodesic_chenhan.pyx":577
 *         return py_result
 * 
 * cdef class CPreviousCH:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _CPreviousCH
 */
struct __pyx_obj_16geodesic_chenhan_CPreviousCH {
  PyObject_HEAD
  boost::shared_ptr<CPreviousCH>  inst;
};


/* "geodesic_chenhan.pyx":691
 *         return py_result
 * 
 * cdef class CRichModel:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _CRichModel
 */
struct __pyx_obj_16geodesic_chenhan_CRichModel {
  PyObject_HEAD
  boost::shared_ptr<CRichModel>  inst;
};


/* "geodesic_chenhan.pyx":849
 *         return py_result
 * 
 * cdef class EdgePoint:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _EdgePoint
 */
struct __pyx_obj_16geodesic_chenhan_EdgePoint {
  PyObject_HEAD
  boost::shared_ptr<EdgePoint>  inst;
};


/* "geodesic_chenhan.pyx":981
 *         return py_result
 * 
 * cdef class InfoAtVertex:             # <<<<<<<<<<<<<<
 *     """
 *     Cython implementation of _InfoAtVertex
 */
struct __pyx_obj_16geodesic_chenhan_InfoAtVertex {
  PyObject_HEAD
  boost::shared_ptr<InfoAtVertex>  inst;
};


/* "geodesic_chenhan.pyx":49
 *         self.inst = shared_ptr[_CBaseModel](new _CBaseModel())
 * 
 *     def LoadModel(self, list vertices , list faces ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel {
  PyObject_HEAD
  PyObject *__pyx_v_faces;
  PyObject *__pyx_v_vertices;
};


/* "geodesic_chenhan.pyx":51
 *     def LoadModel(self, list vertices , list faces ):
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *__pyx_outer_scope;
  PyObject *__pyx_v_elemt_rec;
};


/* "geodesic_chenhan.pyx":52
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *__pyx_outer_scope;
  PyObject *__pyx_v_elemt_rec;
};


/* "geodesic_chenhan.pyx":272
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CICHWithFurtherPriorityQueue(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ {
  PyObject_HEAD
  PyObject *__pyx_v_indexOfSourceVerts;
};


/* "geodesic_chenhan.pyx":275
 *         """Cython signature: void CICHWithFurtherPriorityQueue(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_li;
};


/* "geodesic_chenhan.pyx":288
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex {
  PyObject_HEAD
  PyObject *__pyx_v_resultingPath;
};


/* "geodesic_chenhan.pyx":291
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *__pyx_outer_scope;
  PyObject *__pyx_v_elemt_rec;
};


/* "geodesic_chenhan.pyx":386
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CImprovedCHWithEdgeValve(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ {
  PyObject_HEAD
  PyObject *__pyx_v_indexOfSourceVerts;
};


/* "geodesic_chenhan.pyx":389
 *         """Cython signature: void CImprovedCHWithEdgeValve(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_li;
};


/* "geodesic_chenhan.pyx":402
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex {
  PyObject_HEAD
  PyObject *__pyx_v_resultingPath;
};


/* "geodesic_chenhan.pyx":405
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *__pyx_outer_scope;
  PyObject *__pyx_v_elemt_rec;
};


/* "geodesic_chenhan.pyx":589
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPreviousCH(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ {
  PyObject_HEAD
  PyObject *__pyx_v_indexOfSourceVerts;
};


/* "geodesic_chenhan.pyx":592
 *         """Cython signature: void CPreviousCH(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *__pyx_outer_scope;
  PyObject *__pyx_v_li;
};


/* "geodesic_chenhan.pyx":605
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex {
  PyObject_HEAD
  PyObject *__pyx_v_resultingPath;
};


/* "geodesic_chenhan.pyx":608
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *__pyx_outer_scope;
  PyObject *__pyx_v_elemt_rec;
};


/* "geodesic_chenhan.pyx":806
 *         return py_result
 * 
 *     def LoadModel(self, list vertices , list faces ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel {
  PyObject_HEAD
  PyObject *__pyx_v_faces;
  PyObject *__pyx_v_vertices;
};


/* "geodesic_chenhan.pyx":808
 *     def LoadModel(self, list vertices , list faces ):
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *__pyx_outer_scope;
  PyObject *__pyx_v_elemt_rec;
};


/* "geodesic_chenhan.pyx":809
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 */
struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr {
  PyObject_HEAD
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *__pyx_outer_scope;
  PyObject *__pyx_v_elemt_rec;
};


/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* PyObjectFormatAndDecref.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if CYTHON_FAST_PYCALL
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif // CYTHON_FAST_PYCALL
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* set_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
                                                  Py_ssize_t* p_orig_length, int* p_source_is_set);
static CYTHON_INLINE int __Pyx_set_iter_next(
        PyObject* iter_obj, Py_ssize_t orig_length,
        Py_ssize_t* ppos, PyObject **value,
        int source_is_set);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* bytes_index.proto */
static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds);

/* IncludeStringH.proto */
#include <string.h>

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* None.proto */
#include <new>

/* CppExceptionConversion.proto */
#ifndef __Pyx_CppExn2PyErr
#include <new>
#include <typeinfo>
#include <stdexcept>
#include <ios>
static void __Pyx_CppExn2PyErr() {
  try {
    if (PyErr_Occurred())
      ; // let the latest Python exn pass through and ignore the current one
    else
      throw;
  } catch (const std::bad_alloc& exn) {
    PyErr_SetString(PyExc_MemoryError, exn.what());
  } catch (const std::bad_cast& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::bad_typeid& exn) {
    PyErr_SetString(PyExc_TypeError, exn.what());
  } catch (const std::domain_error& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::invalid_argument& exn) {
    PyErr_SetString(PyExc_ValueError, exn.what());
  } catch (const std::ios_base::failure& exn) {
    PyErr_SetString(PyExc_IOError, exn.what());
  } catch (const std::out_of_range& exn) {
    PyErr_SetString(PyExc_IndexError, exn.what());
  } catch (const std::overflow_error& exn) {
    PyErr_SetString(PyExc_OverflowError, exn.what());
  } catch (const std::range_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::underflow_error& exn) {
    PyErr_SetString(PyExc_ArithmeticError, exn.what());
  } catch (const std::exception& exn) {
    PyErr_SetString(PyExc_RuntimeError, exn.what());
  }
  catch (...)
  {
    PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
  }
}
#endif

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* CoroutineBase.proto */
typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
typedef struct {
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    __Pyx_ExcInfoStruct gi_exc_state;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    PyObject *gi_modulename;
    PyObject *gi_code;
    PyObject *gi_frame;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
    PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
    PyObject *name, PyObject *qualname, PyObject *module_name);
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name);
static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
static int __Pyx_Coroutine_clear(PyObject *self);
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#if CYTHON_USE_EXC_INFO_STACK
#define __Pyx_Coroutine_SwapException(self)
#define __Pyx_Coroutine_ResetAndClearException(self)  __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
#else
#define __Pyx_Coroutine_SwapException(self) {\
    __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
    __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
    }
#define __Pyx_Coroutine_ResetAndClearException(self) {\
    __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
    (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
    }
#endif
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
#endif
static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);

/* PatchModuleWithCoroutine.proto */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

/* PatchGeneratorABC.proto */
static int __Pyx_patch_abc(void);

/* Generator.proto */
#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);


/* Module declarations from 'libc.string' */

/* Module declarations from 'libcpp.string' */

/* Module declarations from 'libcpp.utility' */

/* Module declarations from 'libcpp.set' */

/* Module declarations from 'libcpp.vector' */

/* Module declarations from 'libcpp.pair' */

/* Module declarations from 'libcpp.map' */

/* Module declarations from 'libcpp' */

/* Module declarations from 'AutowrapRefHolder' */

/* Module declarations from 'AutowrapPtrHolder' */

/* Module declarations from 'AutowrapConstPtrHolder' */

/* Module declarations from 'smart_ptr' */

/* Module declarations from 'chenhancc' */

/* Module declarations from 'geodesic_chenhan' */
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_CBaseModel = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_CEdge = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_CFace = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_CICHWithFurtherPriorityQueue = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_CImprovedCHWithEdgeValve = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_CPoint3D = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_CPreviousCH = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_CRichModel = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_EdgePoint = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan_InfoAtVertex = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct__LoadModel = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_1_genexpr = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_2_genexpr = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_3___init__ = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_4_genexpr = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_6_genexpr = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_7___init__ = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_8_genexpr = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_10_genexpr = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_11___init__ = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_12_genexpr = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_14_genexpr = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_15_LoadModel = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_16_genexpr = 0;
static PyTypeObject *__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_17_genexpr = 0;
static std::set<int>  __pyx_convert_set_from_py_int(PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "geodesic_chenhan"
extern int __pyx_module_is_main_geodesic_chenhan;
int __pyx_module_is_main_geodesic_chenhan = 0;

/* Implementation of 'geodesic_chenhan' */
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_chr;
static const char __pyx_k_chr[] = "chr";
static const char __pyx_k_Enum[] = "Enum";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_in_0[] = "in_0";
static const char __pyx_k_in_1[] = "in_1";
static const char __pyx_k_in_2[] = "in_2";
static const char __pyx_k_in_3[] = "in_3";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_CEdge[] = "CEdge";
static const char __pyx_k_CFace[] = "CFace";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_faces[] = "faces";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_PyEnum[] = "_PyEnum";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_init_0[] = "_init_0";
static const char __pyx_k_init_1[] = "_init_1";
static const char __pyx_k_init_2[] = "_init_2";
static const char __pyx_k_init_3[] = "_init_3";
static const char __pyx_k_init_4[] = "_init_4";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_CPoint3D[] = "CPoint3D";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_vertices[] = "vertices";
static const char __pyx_k_EdgePoint[] = "EdgePoint";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_CBaseModel[] = "CBaseModel";
static const char __pyx_k_CRichModel[] = "CRichModel";
static const char __pyx_k_inputModel[] = "inputModel";
static const char __pyx_k_CPreviousCH[] = "CPreviousCH";
static const char __pyx_k_indexOfVert[] = "indexOfVert";
static const char __pyx_k_InfoAtVertex[] = "InfoAtVertex";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_resultingPath[] = "resultingPath";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_geodesic_chenhan[] = "geodesic_chenhan";
static const char __pyx_k_arg_num_wrong_type[] = "arg num wrong type";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_indexOfSourceVerts[] = "indexOfSourceVerts";
static const char __pyx_k_arg_in_0_wrong_type[] = "arg in_0 wrong type";
static const char __pyx_k_arg_in_1_wrong_type[] = "arg in_1 wrong type";
static const char __pyx_k_arg_in_2_wrong_type[] = "arg in_2 wrong type";
static const char __pyx_k_arg_in_3_wrong_type[] = "arg in_3 wrong type";
static const char __pyx_k_arg_faces_wrong_type[] = "arg faces wrong type";
static const char __pyx_k_arg_index_wrong_type[] = "arg index wrong type";
static const char __pyx_k_arg_other_wrong_type[] = "arg other wrong type";
static const char __pyx_k_init___locals_genexpr[] = "__init__.<locals>.genexpr";
static const char __pyx_k_can_not_handle_type_of[] = "can not handle type of ";
static const char __pyx_k_arg_vertices_wrong_type[] = "arg vertices wrong type";
static const char __pyx_k_CImprovedCHWithEdgeValve[] = "CImprovedCHWithEdgeValve";
static const char __pyx_k_LoadModel_locals_genexpr[] = "LoadModel.<locals>.genexpr";
static const char __pyx_k_arg_inputModel_wrong_type[] = "arg inputModel wrong type";
static const char __pyx_k_arg_indexOfVert_wrong_type[] = "arg indexOfVert wrong type";
static const char __pyx_k_CICHWithFurtherPriorityQueue[] = "CICHWithFurtherPriorityQueue";
static const char __pyx_k_arg_resultingPath_wrong_type[] = "arg resultingPath wrong type";
static const char __pyx_k_FindSourceVertex_locals_genexpr[] = "FindSourceVertex.<locals>.genexpr";
static const char __pyx_k_arg_indexOfSourceVerts_wrong_typ[] = "arg indexOfSourceVerts wrong type";
static const char __pyx_k_self_inst_cannot_be_converted_to[] = "self.inst cannot be converted to a Python object for pickling";
static PyObject *__pyx_n_s_CBaseModel;
static PyObject *__pyx_n_s_CEdge;
static PyObject *__pyx_n_s_CFace;
static PyObject *__pyx_n_s_CICHWithFurtherPriorityQueue;
static PyObject *__pyx_n_s_CImprovedCHWithEdgeValve;
static PyObject *__pyx_n_s_CPoint3D;
static PyObject *__pyx_n_s_CPreviousCH;
static PyObject *__pyx_n_s_CRichModel;
static PyObject *__pyx_n_s_EdgePoint;
static PyObject *__pyx_n_s_Enum;
static PyObject *__pyx_n_s_FindSourceVertex_locals_genexpr;
static PyObject *__pyx_n_s_InfoAtVertex;
static PyObject *__pyx_n_s_LoadModel_locals_genexpr;
static PyObject *__pyx_n_s_PyEnum;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_u_arg_faces_wrong_type;
static PyObject *__pyx_kp_u_arg_in_0_wrong_type;
static PyObject *__pyx_kp_u_arg_in_1_wrong_type;
static PyObject *__pyx_kp_u_arg_in_2_wrong_type;
static PyObject *__pyx_kp_u_arg_in_3_wrong_type;
static PyObject *__pyx_kp_u_arg_indexOfSourceVerts_wrong_typ;
static PyObject *__pyx_kp_u_arg_indexOfVert_wrong_type;
static PyObject *__pyx_kp_u_arg_index_wrong_type;
static PyObject *__pyx_kp_u_arg_inputModel_wrong_type;
static PyObject *__pyx_kp_u_arg_num_wrong_type;
static PyObject *__pyx_kp_u_arg_other_wrong_type;
static PyObject *__pyx_kp_u_arg_resultingPath_wrong_type;
static PyObject *__pyx_kp_u_arg_vertices_wrong_type;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_kp_u_can_not_handle_type_of;
static PyObject *__pyx_n_s_chr;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_enum;
static PyObject *__pyx_n_s_faces;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_geodesic_chenhan;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_in_0;
static PyObject *__pyx_n_s_in_1;
static PyObject *__pyx_n_s_in_2;
static PyObject *__pyx_n_s_in_3;
static PyObject *__pyx_n_s_indexOfSourceVerts;
static PyObject *__pyx_n_s_indexOfVert;
static PyObject *__pyx_n_s_init_0;
static PyObject *__pyx_n_s_init_1;
static PyObject *__pyx_n_s_init_2;
static PyObject *__pyx_n_s_init_3;
static PyObject *__pyx_n_s_init_4;
static PyObject *__pyx_n_s_init___locals_genexpr;
static PyObject *__pyx_n_s_inputModel;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_resultingPath;
static PyObject *__pyx_kp_s_self_inst_cannot_be_converted_to;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_vertices;
static void __pyx_pf_16geodesic_chenhan_10CBaseModel___dealloc__(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_10CBaseModel_2__init__(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_9LoadModel_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_9LoadModel_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_4LoadModel(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self, PyObject *__pyx_v_vertices, PyObject *__pyx_v_faces); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_6GetNumOfVerts(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_8GetNumOfFaces(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_10isAValidModel(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_12Vert(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self, PyObject *__pyx_v_in_0); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_16geodesic_chenhan_5CEdge___dealloc__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftVert___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfLeftVert); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftVert_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightVert___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfRightVert); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightVert_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CEdge_19indexOfOppositeVert___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfOppositeVert); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_19indexOfOppositeVert_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftEdge___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfLeftEdge); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftEdge_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightEdge___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfRightEdge); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightEdge_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CEdge_18indexOfReverseEdge___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfReverseEdge); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_18indexOfReverseEdge_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfFrontFace___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfFrontFace); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_16indexOfFrontFace_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CEdge_6length___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, double __pyx_v_length); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_6length_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_2_init_0(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_4_init_1(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_other); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CEdge_6__init__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_16geodesic_chenhan_5CFace___dealloc__(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_2_init_0(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_4_init_1(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self, PyObject *__pyx_v_in_0, PyObject *__pyx_v_in_1, PyObject *__pyx_v_in_2); /* proto */
static int __pyx_pf_16geodesic_chenhan_5CFace_6__init__(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_8setIndices(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self, PyObject *__pyx_v_in_0, PyObject *__pyx_v_in_1, PyObject *__pyx_v_in_2); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue___dealloc__(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8__init___genexpr(PyObject *__pyx_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_2__init__(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_inputModel, PyObject *__pyx_v_indexOfSourceVerts); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_4GetRootSourceOfVert(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16FindSourceVertex_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_6FindSourceVertex(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, PyObject *__pyx_v_indexOfVert, PyObject *__pyx_v_resultingPath); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8PickShortestPaths(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, PyObject *__pyx_v_num); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_10Execute(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_12GetRunTime(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_14GetMemoryCost(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16GetWindowNum(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_18GetMaxLenOfQue(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_20GetNPE(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_22GetDepthOfSequenceTree(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_24HasBeenCompleted(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_26GetVertexDistances(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve___dealloc__(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8__init___genexpr(PyObject *__pyx_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_2__init__(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_inputModel, PyObject *__pyx_v_indexOfSourceVerts); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_4GetRootSourceOfVert(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16FindSourceVertex_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_6FindSourceVertex(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, PyObject *__pyx_v_indexOfVert, PyObject *__pyx_v_resultingPath); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8PickShortestPaths(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, PyObject *__pyx_v_num); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_10Execute(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_12GetRunTime(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_14GetMemoryCost(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16GetWindowNum(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_18GetMaxLenOfQue(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_20GetNPE(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_22GetDepthOfSequenceTree(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_24HasBeenCompleted(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_26GetVertexDistances(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_16geodesic_chenhan_8CPoint3D___dealloc__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_8CPoint3D_1x___set__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_1x_2__get__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_8CPoint3D_1y___set__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, double __pyx_v_y); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_1y_2__get__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_8CPoint3D_1z___set__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_1z_2__get__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_2_init_0(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_4_init_1(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_6_init_2(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, double __pyx_v_in_0, double __pyx_v_in_1, double __pyx_v_in_2); /* proto */
static int __pyx_pf_16geodesic_chenhan_8CPoint3D_8__init__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_10Normalize(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_12Len(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_16geodesic_chenhan_11CPreviousCH___dealloc__(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_8__init___genexpr(PyObject *__pyx_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_11CPreviousCH_2__init__(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_inputModel, PyObject *__pyx_v_indexOfSourceVerts); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_4GetRootSourceOfVert(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_16FindSourceVertex_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_6FindSourceVertex(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, PyObject *__pyx_v_indexOfVert, PyObject *__pyx_v_resultingPath); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_8PickShortestPaths(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, PyObject *__pyx_v_num); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_10Execute(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_12GetRunTime(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_14GetMemoryCost(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_16GetWindowNum(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_18GetMaxLenOfQue(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_20GetNPE(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_22GetDepthOfSequenceTree(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_24HasBeenCompleted(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_26GetVertexDistances(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_16geodesic_chenhan_10CRichModel___dealloc__(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_10CRichModel_2__init__(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_4Preprocess(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_6GetNumOfEdges(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_8GetNumOfValidDirectedEdges(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_10GetNumOfTotalUndirectedEdges(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_12GetNumOfGenera(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_14GetNumOfIsolated(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_16GetNumOfComponents(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_18GetNumOfBoundries(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_20IsConvexVert(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_22isBoundaryVert(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_24IsClosedModel(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_26IsExtremeEdge(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_28IsStartEdge(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_30HasBeenProcessed(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_32Edge(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_9LoadModel_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_9LoadModel_3genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_34LoadModel(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_vertices, PyObject *__pyx_v_faces); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_36GetNumOfVerts(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_38GetNumOfFaces(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_40isAValidModel(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_42Vert(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_16geodesic_chenhan_9EdgePoint___dealloc__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_9EdgePoint_5index___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_5index_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_9EdgePoint_13leftVertIndex___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_leftVertIndex); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_13leftVertIndex_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_9EdgePoint_14rightVertIndex___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_rightVertIndex); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_14rightVertIndex_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_9EdgePoint_10proportion___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, double __pyx_v_proportion); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_10proportion_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_9EdgePoint_8isVertex___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_isVertex); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_8isVertex_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_2_init_0(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_4_init_1(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_6_init_2(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_in_0); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_8_init_3(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_in_0, double __pyx_v_in_1); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_10_init_4(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_in_0, PyObject *__pyx_v_in_1, PyObject *__pyx_v_in_2, double __pyx_v_in_3); /* proto */
static int __pyx_pf_16geodesic_chenhan_9EdgePoint_12__init__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_14Get3DPoint(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_in_0); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static void __pyx_pf_16geodesic_chenhan_12InfoAtVertex___dealloc__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_fParentIsPseudoSource); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_9birthTime___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_birthTime); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_9birthTime_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_13indexOfParent___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_indexOfParent); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_13indexOfParent_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_indexOfRootVertOfParent); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_5level___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_level); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_5level_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_11disUptodate___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, double __pyx_v_disUptodate); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_11disUptodate_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_9entryProp___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, double __pyx_v_entryProp); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_9entryProp_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_2_init_0(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_4_init_1(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_other); /* proto */
static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_6__init__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_16geodesic_chenhan_CBaseModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan_CEdge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan_CFace(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan_CICHWithFurtherPriorityQueue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan_CImprovedCHWithEdgeValve(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan_CPoint3D(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan_CPreviousCH(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan_CRichModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan_EdgePoint(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan_InfoAtVertex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct__LoadModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_3___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_7___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_10_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_11___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_12_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_14_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_15_LoadModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_16_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_17_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
/* Late includes */

/* "geodesic_chenhan.pyx":41
 *     cdef shared_ptr[_CBaseModel] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_10CBaseModel_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_10CBaseModel_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_10CBaseModel___dealloc__(((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_10CBaseModel___dealloc__(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":42
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":41
 *     cdef shared_ptr[_CBaseModel] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":45
 * 
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CBaseModel()"""
 *         self.inst = shared_ptr[_CBaseModel](new _CBaseModel())
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_10CBaseModel_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CBaseModel_2__init__[] = "Cython signature: void CBaseModel()";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_10CBaseModel_2__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_10CBaseModel_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CBaseModel_2__init__(((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_10CBaseModel_2__init__(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "geodesic_chenhan.pyx":47
 *     def __init__(self):
 *         """Cython signature: void CBaseModel()"""
 *         self.inst = shared_ptr[_CBaseModel](new _CBaseModel())             # <<<<<<<<<<<<<<
 * 
 *     def LoadModel(self, list vertices , list faces ):
 */
  __pyx_v_self->inst = boost::shared_ptr<CBaseModel> (new CBaseModel());

  /* "geodesic_chenhan.pyx":45
 * 
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CBaseModel()"""
 *         self.inst = shared_ptr[_CBaseModel](new _CBaseModel())
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":49
 *         self.inst = shared_ptr[_CBaseModel](new _CBaseModel())
 * 
 *     def LoadModel(self, list vertices , list faces ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_5LoadModel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CBaseModel_4LoadModel[] = "Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)";
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_5LoadModel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertices = 0;
  PyObject *__pyx_v_faces = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LoadModel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertices,&__pyx_n_s_faces,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertices)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_faces)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("LoadModel", 1, 2, 2, 1); __PYX_ERR(1, 49, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "LoadModel") < 0)) __PYX_ERR(1, 49, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vertices = ((PyObject*)values[0]);
    __pyx_v_faces = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("LoadModel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 49, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.LoadModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertices), (&PyList_Type), 1, "vertices", 1))) __PYX_ERR(1, 49, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_faces), (&PyList_Type), 1, "faces", 1))) __PYX_ERR(1, 49, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CBaseModel_4LoadModel(((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)__pyx_v_self), __pyx_v_vertices, __pyx_v_faces);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":51
 *     def LoadModel(self, list vertices , list faces ):
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 */

static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_9LoadModel_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_1_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 51, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_LoadModel_locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 51, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.LoadModel.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 51, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_vertices)) { __Pyx_RaiseClosureNameError("vertices"); __PYX_ERR(1, 51, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 51, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_vertices; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 51, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elemt_rec);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_ptype_16geodesic_chenhan_CPoint3D); 
    __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
    if (__pyx_t_5) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":52
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 */

static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_9LoadModel_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_2_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 52, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_5generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_LoadModel_locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.LoadModel.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 52, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_faces)) { __Pyx_RaiseClosureNameError("faces"); __PYX_ERR(1, 52, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_faces == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 52, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_faces; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 52, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elemt_rec);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_ptype_16geodesic_chenhan_CFace); 
    __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
    if (__pyx_t_5) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":49
 *         self.inst = shared_ptr[_CBaseModel](new _CBaseModel())
 * 
 *     def LoadModel(self, list vertices , list faces ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 */

static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_4LoadModel(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self, PyObject *__pyx_v_vertices, PyObject *__pyx_v_faces) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *__pyx_cur_scope;
  std::vector<CPoint3D>  *__pyx_v_v0;
  struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_item0 = 0;
  std::vector<CFace>  *__pyx_v_v1;
  struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_item1 = 0;
  PyObject *__pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_2generator = 0;
  PyObject *__pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_5generator1 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::vector<CPoint3D>  *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  std::vector<CFace>  *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("LoadModel", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct__LoadModel(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct__LoadModel, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 49, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_vertices = __pyx_v_vertices;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_vertices);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_vertices);
  __pyx_cur_scope->__pyx_v_faces = __pyx_v_faces;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_faces);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_faces);

  /* "geodesic_chenhan.pyx":51
 *     def LoadModel(self, list vertices , list faces ):
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_vertices;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyList_Check(__pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_2 = __pyx_pf_16geodesic_chenhan_10CBaseModel_9LoadModel_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 51, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_vertices_wrong_type);
      __PYX_ERR(1, 51, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":52
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_faces;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_4 = PyList_Check(__pyx_t_5); 
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_5 = __pyx_pf_16geodesic_chenhan_10CBaseModel_9LoadModel_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 52, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_L5_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_faces_wrong_type);
      __PYX_ERR(1, 52, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":53
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()             # <<<<<<<<<<<<<<
 *         cdef CPoint3D item0
 *         for item0 in vertices:
 */
  try {
    __pyx_t_6 = new std::vector<CPoint3D> ();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 53, __pyx_L1_error)
  }
  __pyx_v_v0 = __pyx_t_6;

  /* "geodesic_chenhan.pyx":55
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 *         for item0 in vertices:             # <<<<<<<<<<<<<<
 *             v0.push_back(deref(item0.inst.get()))
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 */
  if (unlikely(__pyx_cur_scope->__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 55, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_vertices; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 55, __pyx_L1_error)
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_16geodesic_chenhan_CPoint3D))))) __PYX_ERR(1, 55, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_item0, ((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "geodesic_chenhan.pyx":56
 *         cdef CPoint3D item0
 *         for item0 in vertices:
 *             v0.push_back(deref(item0.inst.get()))             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 *         cdef CFace item1
 */
    try {
      __pyx_v_v0->push_back((*__pyx_v_item0->inst.get()));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 56, __pyx_L1_error)
    }

    /* "geodesic_chenhan.pyx":55
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 *         for item0 in vertices:             # <<<<<<<<<<<<<<
 *             v0.push_back(deref(item0.inst.get()))
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "geodesic_chenhan.pyx":57
 *         for item0 in vertices:
 *             v0.push_back(deref(item0.inst.get()))
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()             # <<<<<<<<<<<<<<
 *         cdef CFace item1
 *         for item1 in faces:
 */
  try {
    __pyx_t_8 = new std::vector<CFace> ();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 57, __pyx_L1_error)
  }
  __pyx_v_v1 = __pyx_t_8;

  /* "geodesic_chenhan.pyx":59
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 *         cdef CFace item1
 *         for item1 in faces:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 */
  if (unlikely(__pyx_cur_scope->__pyx_v_faces == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 59, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_faces; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 59, __pyx_L1_error)
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_16geodesic_chenhan_CFace))))) __PYX_ERR(1, 59, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_item1, ((struct __pyx_obj_16geodesic_chenhan_CFace *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "geodesic_chenhan.pyx":60
 *         cdef CFace item1
 *         for item1 in faces:
 *             v1.push_back(deref(item1.inst.get()))             # <<<<<<<<<<<<<<
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 *         del v1
 */
    try {
      __pyx_v_v1->push_back((*__pyx_v_item1->inst.get()));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 60, __pyx_L1_error)
    }

    /* "geodesic_chenhan.pyx":59
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 *         cdef CFace item1
 *         for item1 in faces:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "geodesic_chenhan.pyx":61
 *         for item1 in faces:
 *             v1.push_back(deref(item1.inst.get()))
 *         self.inst.get().LoadModel(deref(v0), deref(v1))             # <<<<<<<<<<<<<<
 *         del v1
 *         del v0
 */
  __pyx_v_self->inst.get()->LoadModel((*__pyx_v_v0), (*__pyx_v_v1));

  /* "geodesic_chenhan.pyx":62
 *             v1.push_back(deref(item1.inst.get()))
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 *         del v1             # <<<<<<<<<<<<<<
 *         del v0
 * 
 */
  delete __pyx_v_v1;

  /* "geodesic_chenhan.pyx":63
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 *         del v1
 *         del v0             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfVerts(self):
 */
  delete __pyx_v_v0;

  /* "geodesic_chenhan.pyx":49
 *         self.inst = shared_ptr[_CBaseModel](new _CBaseModel())
 * 
 *     def LoadModel(self, list vertices , list faces ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.LoadModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_item0);
  __Pyx_XDECREF((PyObject *)__pyx_v_item1);
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_2generator);
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_10CBaseModel_9LoadModel_5generator1);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":65
 *         del v0
 * 
 *     def GetNumOfVerts(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfVerts()"""
 *         cdef int _r = self.inst.get().GetNumOfVerts()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_7GetNumOfVerts(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CBaseModel_6GetNumOfVerts[] = "Cython signature: int GetNumOfVerts()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_7GetNumOfVerts(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfVerts (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CBaseModel_6GetNumOfVerts(((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_6GetNumOfVerts(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfVerts", 0);

  /* "geodesic_chenhan.pyx":67
 *     def GetNumOfVerts(self):
 *         """Cython signature: int GetNumOfVerts()"""
 *         cdef int _r = self.inst.get().GetNumOfVerts()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfVerts();

  /* "geodesic_chenhan.pyx":68
 *         """Cython signature: int GetNumOfVerts()"""
 *         cdef int _r = self.inst.get().GetNumOfVerts()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":69
 *         cdef int _r = self.inst.get().GetNumOfVerts()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfFaces(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":65
 *         del v0
 * 
 *     def GetNumOfVerts(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfVerts()"""
 *         cdef int _r = self.inst.get().GetNumOfVerts()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.GetNumOfVerts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":71
 *         return py_result
 * 
 *     def GetNumOfFaces(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfFaces()"""
 *         cdef int _r = self.inst.get().GetNumOfFaces()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_9GetNumOfFaces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CBaseModel_8GetNumOfFaces[] = "Cython signature: int GetNumOfFaces()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_9GetNumOfFaces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfFaces (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CBaseModel_8GetNumOfFaces(((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_8GetNumOfFaces(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfFaces", 0);

  /* "geodesic_chenhan.pyx":73
 *     def GetNumOfFaces(self):
 *         """Cython signature: int GetNumOfFaces()"""
 *         cdef int _r = self.inst.get().GetNumOfFaces()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfFaces();

  /* "geodesic_chenhan.pyx":74
 *         """Cython signature: int GetNumOfFaces()"""
 *         cdef int _r = self.inst.get().GetNumOfFaces()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":75
 *         cdef int _r = self.inst.get().GetNumOfFaces()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def isAValidModel(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":71
 *         return py_result
 * 
 *     def GetNumOfFaces(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfFaces()"""
 *         cdef int _r = self.inst.get().GetNumOfFaces()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.GetNumOfFaces", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":77
 *         return py_result
 * 
 *     def isAValidModel(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool isAValidModel()"""
 *         cdef bool _r = self.inst.get().isAValidModel()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_11isAValidModel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CBaseModel_10isAValidModel[] = "Cython signature: bool isAValidModel()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_11isAValidModel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isAValidModel (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CBaseModel_10isAValidModel(((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_10isAValidModel(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isAValidModel", 0);

  /* "geodesic_chenhan.pyx":79
 *     def isAValidModel(self):
 *         """Cython signature: bool isAValidModel()"""
 *         cdef bool _r = self.inst.get().isAValidModel()             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->isAValidModel();

  /* "geodesic_chenhan.pyx":80
 *         """Cython signature: bool isAValidModel()"""
 *         cdef bool _r = self.inst.get().isAValidModel()
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":81
 *         cdef bool _r = self.inst.get().isAValidModel()
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def Vert(self,  in_0 ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":77
 *         return py_result
 * 
 *     def isAValidModel(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool isAValidModel()"""
 *         cdef bool _r = self.inst.get().isAValidModel()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.isAValidModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":83
 *         return py_result
 * 
 *     def Vert(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: CPoint3D Vert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_13Vert(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CBaseModel_12Vert[] = "Cython signature: CPoint3D Vert(int)";
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_13Vert(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Vert (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CBaseModel_12Vert(((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)__pyx_v_self), ((PyObject *)__pyx_v_in_0));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_12Vert(struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self, PyObject *__pyx_v_in_0) {
  CPoint3D *__pyx_v__r;
  struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_py_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Vert", 0);

  /* "geodesic_chenhan.pyx":85
 *     def Vert(self,  in_0 ):
 *         """Cython signature: CPoint3D Vert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Vert((<int>in_0)))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 85, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":87
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 * 
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Vert((<int>in_0)))             # <<<<<<<<<<<<<<
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)
 *         py_result.inst = shared_ptr[_CPoint3D](_r)
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 87, __pyx_L1_error)
  __pyx_v__r = new CPoint3D(__pyx_v_self->inst.get()->Vert(((int)__pyx_t_4)));

  /* "geodesic_chenhan.pyx":88
 * 
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Vert((<int>in_0)))
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)             # <<<<<<<<<<<<<<
 *         py_result.inst = shared_ptr[_CPoint3D](_r)
 *         return py_result
 */
  __pyx_t_5 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_CPoint3D(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_CPoint3D), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __pyx_v_py_result = ((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "geodesic_chenhan.pyx":89
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Vert((<int>in_0)))
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)
 *         py_result.inst = shared_ptr[_CPoint3D](_r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result->inst = boost::shared_ptr<CPoint3D> (__pyx_v__r);

  /* "geodesic_chenhan.pyx":90
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)
 *         py_result.inst = shared_ptr[_CPoint3D](_r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 * cdef class CEdge:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_py_result));
  __pyx_r = ((PyObject *)__pyx_v_py_result);
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":83
 *         return py_result
 * 
 *     def Vert(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: CPoint3D Vert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.Vert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_py_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CBaseModel_14__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_10CBaseModel_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CBaseModel_16__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CBaseModel_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CBaseModel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CBaseModel.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":99
 *     cdef shared_ptr[_CEdge] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_5CEdge_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_5CEdge_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_5CEdge___dealloc__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_5CEdge___dealloc__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":100
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":99
 *     cdef shared_ptr[_CEdge] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":104
 * 
 *     property indexOfLeftVert:
 *         def __set__(self,  indexOfLeftVert):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfLeftVert = (<int>indexOfLeftVert)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftVert_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfLeftVert); /*proto*/
static int __pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftVert_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfLeftVert) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftVert___set__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((PyObject *)__pyx_v_indexOfLeftVert));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftVert___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfLeftVert) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":106
 *         def __set__(self,  indexOfLeftVert):
 * 
 *             self.inst.get().indexOfLeftVert = (<int>indexOfLeftVert)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_indexOfLeftVert); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 106, __pyx_L1_error)
  __pyx_v_self->inst.get()->indexOfLeftVert = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":104
 * 
 *     property indexOfLeftVert:
 *         def __set__(self,  indexOfLeftVert):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfLeftVert = (<int>indexOfLeftVert)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfLeftVert.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":109
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfLeftVert
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftVert_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftVert_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftVert_2__get__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftVert_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":110
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfLeftVert             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->indexOfLeftVert;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":111
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfLeftVert
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":112
 *             cdef int _r = self.inst.get().indexOfLeftVert
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property indexOfRightVert:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":109
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfLeftVert
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfLeftVert.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":115
 * 
 *     property indexOfRightVert:
 *         def __set__(self,  indexOfRightVert):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfRightVert = (<int>indexOfRightVert)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightVert_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfRightVert); /*proto*/
static int __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightVert_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfRightVert) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightVert___set__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((PyObject *)__pyx_v_indexOfRightVert));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightVert___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfRightVert) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":117
 *         def __set__(self,  indexOfRightVert):
 * 
 *             self.inst.get().indexOfRightVert = (<int>indexOfRightVert)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_indexOfRightVert); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 117, __pyx_L1_error)
  __pyx_v_self->inst.get()->indexOfRightVert = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":115
 * 
 *     property indexOfRightVert:
 *         def __set__(self,  indexOfRightVert):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfRightVert = (<int>indexOfRightVert)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfRightVert.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":120
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfRightVert
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightVert_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightVert_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightVert_2__get__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightVert_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":121
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfRightVert             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->indexOfRightVert;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":122
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfRightVert
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":123
 *             cdef int _r = self.inst.get().indexOfRightVert
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property indexOfOppositeVert:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":120
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfRightVert
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfRightVert.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":126
 * 
 *     property indexOfOppositeVert:
 *         def __set__(self,  indexOfOppositeVert):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfOppositeVert = (<int>indexOfOppositeVert)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CEdge_19indexOfOppositeVert_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfOppositeVert); /*proto*/
static int __pyx_pw_16geodesic_chenhan_5CEdge_19indexOfOppositeVert_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfOppositeVert) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_19indexOfOppositeVert___set__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((PyObject *)__pyx_v_indexOfOppositeVert));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CEdge_19indexOfOppositeVert___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfOppositeVert) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":128
 *         def __set__(self,  indexOfOppositeVert):
 * 
 *             self.inst.get().indexOfOppositeVert = (<int>indexOfOppositeVert)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_indexOfOppositeVert); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 128, __pyx_L1_error)
  __pyx_v_self->inst.get()->indexOfOppositeVert = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":126
 * 
 *     property indexOfOppositeVert:
 *         def __set__(self,  indexOfOppositeVert):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfOppositeVert = (<int>indexOfOppositeVert)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfOppositeVert.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":131
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfOppositeVert
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_19indexOfOppositeVert_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_19indexOfOppositeVert_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_19indexOfOppositeVert_2__get__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_19indexOfOppositeVert_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":132
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfOppositeVert             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->indexOfOppositeVert;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":133
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfOppositeVert
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":134
 *             cdef int _r = self.inst.get().indexOfOppositeVert
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property indexOfLeftEdge:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":131
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfOppositeVert
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfOppositeVert.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":137
 * 
 *     property indexOfLeftEdge:
 *         def __set__(self,  indexOfLeftEdge):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfLeftEdge = (<int>indexOfLeftEdge)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftEdge_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfLeftEdge); /*proto*/
static int __pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftEdge_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfLeftEdge) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftEdge___set__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((PyObject *)__pyx_v_indexOfLeftEdge));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftEdge___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfLeftEdge) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":139
 *         def __set__(self,  indexOfLeftEdge):
 * 
 *             self.inst.get().indexOfLeftEdge = (<int>indexOfLeftEdge)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_indexOfLeftEdge); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 139, __pyx_L1_error)
  __pyx_v_self->inst.get()->indexOfLeftEdge = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":137
 * 
 *     property indexOfLeftEdge:
 *         def __set__(self,  indexOfLeftEdge):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfLeftEdge = (<int>indexOfLeftEdge)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfLeftEdge.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":142
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfLeftEdge
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftEdge_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftEdge_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftEdge_2__get__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_15indexOfLeftEdge_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":143
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfLeftEdge             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->indexOfLeftEdge;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":144
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfLeftEdge
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":145
 *             cdef int _r = self.inst.get().indexOfLeftEdge
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property indexOfRightEdge:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":142
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfLeftEdge
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfLeftEdge.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":148
 * 
 *     property indexOfRightEdge:
 *         def __set__(self,  indexOfRightEdge):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfRightEdge = (<int>indexOfRightEdge)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightEdge_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfRightEdge); /*proto*/
static int __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightEdge_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfRightEdge) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightEdge___set__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((PyObject *)__pyx_v_indexOfRightEdge));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightEdge___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfRightEdge) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":150
 *         def __set__(self,  indexOfRightEdge):
 * 
 *             self.inst.get().indexOfRightEdge = (<int>indexOfRightEdge)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_indexOfRightEdge); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 150, __pyx_L1_error)
  __pyx_v_self->inst.get()->indexOfRightEdge = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":148
 * 
 *     property indexOfRightEdge:
 *         def __set__(self,  indexOfRightEdge):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfRightEdge = (<int>indexOfRightEdge)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfRightEdge.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":153
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfRightEdge
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightEdge_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightEdge_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightEdge_2__get__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_16indexOfRightEdge_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":154
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfRightEdge             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->indexOfRightEdge;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":155
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfRightEdge
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":156
 *             cdef int _r = self.inst.get().indexOfRightEdge
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property indexOfReverseEdge:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":153
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfRightEdge
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfRightEdge.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":159
 * 
 *     property indexOfReverseEdge:
 *         def __set__(self,  indexOfReverseEdge):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfReverseEdge = (<int>indexOfReverseEdge)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CEdge_18indexOfReverseEdge_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfReverseEdge); /*proto*/
static int __pyx_pw_16geodesic_chenhan_5CEdge_18indexOfReverseEdge_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfReverseEdge) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_18indexOfReverseEdge___set__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((PyObject *)__pyx_v_indexOfReverseEdge));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CEdge_18indexOfReverseEdge___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfReverseEdge) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":161
 *         def __set__(self,  indexOfReverseEdge):
 * 
 *             self.inst.get().indexOfReverseEdge = (<int>indexOfReverseEdge)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_indexOfReverseEdge); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 161, __pyx_L1_error)
  __pyx_v_self->inst.get()->indexOfReverseEdge = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":159
 * 
 *     property indexOfReverseEdge:
 *         def __set__(self,  indexOfReverseEdge):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfReverseEdge = (<int>indexOfReverseEdge)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfReverseEdge.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":164
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfReverseEdge
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_18indexOfReverseEdge_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_18indexOfReverseEdge_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_18indexOfReverseEdge_2__get__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_18indexOfReverseEdge_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":165
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfReverseEdge             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->indexOfReverseEdge;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":166
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfReverseEdge
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":167
 *             cdef int _r = self.inst.get().indexOfReverseEdge
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property indexOfFrontFace:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":164
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfReverseEdge
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfReverseEdge.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":170
 * 
 *     property indexOfFrontFace:
 *         def __set__(self,  indexOfFrontFace):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfFrontFace = (<int>indexOfFrontFace)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfFrontFace_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfFrontFace); /*proto*/
static int __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfFrontFace_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfFrontFace) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfFrontFace___set__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((PyObject *)__pyx_v_indexOfFrontFace));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfFrontFace___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_indexOfFrontFace) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":172
 *         def __set__(self,  indexOfFrontFace):
 * 
 *             self.inst.get().indexOfFrontFace = (<int>indexOfFrontFace)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_indexOfFrontFace); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 172, __pyx_L1_error)
  __pyx_v_self->inst.get()->indexOfFrontFace = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":170
 * 
 *     property indexOfFrontFace:
 *         def __set__(self,  indexOfFrontFace):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfFrontFace = (<int>indexOfFrontFace)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfFrontFace.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":175
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfFrontFace
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_16indexOfFrontFace_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_16indexOfFrontFace_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_16indexOfFrontFace_2__get__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_16indexOfFrontFace_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":176
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfFrontFace             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->indexOfFrontFace;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":177
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfFrontFace
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":178
 *             cdef int _r = self.inst.get().indexOfFrontFace
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property length:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":175
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfFrontFace
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.indexOfFrontFace.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":181
 * 
 *     property length:
 *         def __set__(self, double length):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().length = (<double>length)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CEdge_6length_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_length); /*proto*/
static int __pyx_pw_16geodesic_chenhan_5CEdge_6length_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_length) {
  double __pyx_v_length;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_length); {
    __pyx_v_length = __pyx_PyFloat_AsDouble(__pyx_arg_length); if (unlikely((__pyx_v_length == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 181, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.length.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_6length___set__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((double)__pyx_v_length));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CEdge_6length___set__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, double __pyx_v_length) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":183
 *         def __set__(self, double length):
 * 
 *             self.inst.get().length = (<double>length)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.get()->length = ((double)__pyx_v_length);

  /* "geodesic_chenhan.pyx":181
 * 
 *     property length:
 *         def __set__(self, double length):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().length = (<double>length)
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":186
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().length
 *             py_result = <double>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_6length_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_6length_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_6length_2__get__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_6length_2__get__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":187
 * 
 *         def __get__(self):
 *             cdef double _r = self.inst.get().length             # <<<<<<<<<<<<<<
 *             py_result = <double>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->length;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":188
 *         def __get__(self):
 *             cdef double _r = self.inst.get().length
 *             py_result = <double>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":189
 *             cdef double _r = self.inst.get().length
 *             py_result = <double>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     def _init_0(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":186
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().length
 *             py_result = <double>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.length.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":191
 *             return py_result
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CEdge()"""
 *         self.inst = shared_ptr[_CEdge](new _CEdge())
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_5CEdge_2_init_0[] = "Cython signature: void CEdge()";
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0 (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_2_init_0(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_2_init_0(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0", 0);

  /* "geodesic_chenhan.pyx":193
 *     def _init_0(self):
 *         """Cython signature: void CEdge()"""
 *         self.inst = shared_ptr[_CEdge](new _CEdge())             # <<<<<<<<<<<<<<
 * 
 *     def _init_1(self, CEdge other ):
 */
  __pyx_v_self->inst = boost::shared_ptr<CEdge> (new CEdge());

  /* "geodesic_chenhan.pyx":191
 *             return py_result
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CEdge()"""
 *         self.inst = shared_ptr[_CEdge](new _CEdge())
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":195
 *         self.inst = shared_ptr[_CEdge](new _CEdge())
 * 
 *     def _init_1(self, CEdge other ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CEdge(CEdge other)"""
 *         assert isinstance(other, CEdge), 'arg other wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_16geodesic_chenhan_5CEdge_4_init_1[] = "Cython signature: void CEdge(CEdge other)";
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_1 (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_16geodesic_chenhan_CEdge, 1, "other", 0))) __PYX_ERR(1, 195, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_4_init_1(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_4_init_1(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_1", 0);

  /* "geodesic_chenhan.pyx":197
 *     def _init_1(self, CEdge other ):
 *         """Cython signature: void CEdge(CEdge other)"""
 *         assert isinstance(other, CEdge), 'arg other wrong type'             # <<<<<<<<<<<<<<
 * 
 *         self.inst = shared_ptr[_CEdge](new _CEdge((deref(other.inst.get()))))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_other), __pyx_ptype_16geodesic_chenhan_CEdge); 
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_other_wrong_type);
      __PYX_ERR(1, 197, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":199
 *         assert isinstance(other, CEdge), 'arg other wrong type'
 * 
 *         self.inst = shared_ptr[_CEdge](new _CEdge((deref(other.inst.get()))))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args , **kwargs):
 */
  __pyx_v_self->inst = boost::shared_ptr<CEdge> (new CEdge((*__pyx_v_other->inst.get())));

  /* "geodesic_chenhan.pyx":195
 *         self.inst = shared_ptr[_CEdge](new _CEdge())
 * 
 *     def _init_1(self, CEdge other ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CEdge(CEdge other)"""
 *         assert isinstance(other, CEdge), 'arg other wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CEdge._init_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":201
 *         self.inst = shared_ptr[_CEdge](new _CEdge((deref(other.inst.get()))))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void CEdge()
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CEdge_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_5CEdge_6__init__[] = "\n          - Cython signature: void CEdge()\n          - Cython signature: void CEdge(CEdge other)\n";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_5CEdge_6__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_5CEdge_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_6__init__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CEdge_6__init__(struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "geodesic_chenhan.pyx":206
 *           - Cython signature: void CEdge(CEdge other)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CEdge)):
 */
  __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_args) != 0);
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "geodesic_chenhan.pyx":207
 * """
 *         if not args:
 *              self._init_0(*args)             # <<<<<<<<<<<<<<
 *         elif (len(args)==1) and (isinstance(args[0], CEdge)):
 *              self._init_1(*args)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":206
 *           - Cython signature: void CEdge(CEdge other)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CEdge)):
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":208
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CEdge)):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         else:
 */
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 208, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_5 == 1) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_t_4, __pyx_ptype_16geodesic_chenhan_CEdge); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_1 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (likely(__pyx_t_2)) {

    /* "geodesic_chenhan.pyx":209
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CEdge)):
 *              self._init_1(*args)             # <<<<<<<<<<<<<<
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "geodesic_chenhan.pyx":208
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CEdge)):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":211
 *              self._init_1(*args)
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))             # <<<<<<<<<<<<<<
 * 
 * cdef class CFace:
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_args), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_not_handle_type_of, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 211, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "geodesic_chenhan.pyx":201
 *         self.inst = shared_ptr[_CEdge](new _CEdge((deref(other.inst.get()))))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void CEdge()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_8__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CEdge_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CEdge_10__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CEdge_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CEdge.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":220
 *     cdef shared_ptr[_CFace] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_5CFace_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_5CFace_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_5CFace___dealloc__(((struct __pyx_obj_16geodesic_chenhan_CFace *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_5CFace___dealloc__(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":221
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":220
 *     cdef shared_ptr[_CFace] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":224
 * 
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CFace()"""
 *         self.inst = shared_ptr[_CFace](new _CFace())
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_5CFace_2_init_0[] = "Cython signature: void CFace()";
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0 (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CFace_2_init_0(((struct __pyx_obj_16geodesic_chenhan_CFace *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_2_init_0(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0", 0);

  /* "geodesic_chenhan.pyx":226
 *     def _init_0(self):
 *         """Cython signature: void CFace()"""
 *         self.inst = shared_ptr[_CFace](new _CFace())             # <<<<<<<<<<<<<<
 * 
 *     def _init_1(self,  in_0 ,  in_1 ,  in_2 ):
 */
  __pyx_v_self->inst = boost::shared_ptr<CFace> (new CFace());

  /* "geodesic_chenhan.pyx":224
 * 
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CFace()"""
 *         self.inst = shared_ptr[_CFace](new _CFace())
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":228
 *         self.inst = shared_ptr[_CFace](new _CFace())
 * 
 *     def _init_1(self,  in_0 ,  in_1 ,  in_2 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CFace(int, int, int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_5CFace_4_init_1[] = "Cython signature: void CFace(int, int, int)";
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_0 = 0;
  PyObject *__pyx_v_in_1 = 0;
  PyObject *__pyx_v_in_2 = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_1 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_0,&__pyx_n_s_in_1,&__pyx_n_s_in_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_0)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_1", 1, 3, 3, 1); __PYX_ERR(1, 228, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_1", 1, 3, 3, 2); __PYX_ERR(1, 228, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_1") < 0)) __PYX_ERR(1, 228, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_in_0 = values[0];
    __pyx_v_in_1 = values[1];
    __pyx_v_in_2 = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_init_1", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 228, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CFace._init_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CFace_4_init_1(((struct __pyx_obj_16geodesic_chenhan_CFace *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1, __pyx_v_in_2);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_4_init_1(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self, PyObject *__pyx_v_in_0, PyObject *__pyx_v_in_1, PyObject *__pyx_v_in_2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_1", 0);

  /* "geodesic_chenhan.pyx":230
 *     def _init_1(self,  in_0 ,  in_1 ,  in_2 ):
 *         """Cython signature: void CFace(int, int, int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 230, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":231
 *         """Cython signature: void CFace(int, int, int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_1); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_1); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_1_wrong_type);
      __PYX_ERR(1, 231, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":232
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_2); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_2); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L7_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_2_wrong_type);
      __PYX_ERR(1, 232, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":236
 * 
 * 
 *         self.inst = shared_ptr[_CFace](new _CFace((<int>in_0), (<int>in_1), (<int>in_2)))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args , **kwargs):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_in_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L1_error)
  __pyx_v_self->inst = boost::shared_ptr<CFace> (new CFace(((int)__pyx_t_4), ((int)__pyx_t_5), ((int)__pyx_t_6)));

  /* "geodesic_chenhan.pyx":228
 *         self.inst = shared_ptr[_CFace](new _CFace())
 * 
 *     def _init_1(self,  in_0 ,  in_1 ,  in_2 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CFace(int, int, int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CFace._init_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":238
 *         self.inst = shared_ptr[_CFace](new _CFace((<int>in_0), (<int>in_1), (<int>in_2)))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void CFace()
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_5CFace_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_5CFace_6__init__[] = "\n          - Cython signature: void CFace()\n          - Cython signature: void CFace(int, int, int)\n";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_5CFace_6__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_5CFace_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CFace_6__init__(((struct __pyx_obj_16geodesic_chenhan_CFace *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_5CFace_6__init__(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "geodesic_chenhan.pyx":243
 *           - Cython signature: void CFace(int, int, int)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==3) and (isinstance(args[0], (int, long))) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))):
 */
  __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_args) != 0);
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "geodesic_chenhan.pyx":244
 * """
 *         if not args:
 *              self._init_0(*args)             # <<<<<<<<<<<<<<
 *         elif (len(args)==3) and (isinstance(args[0], (int, long))) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))):
 *              self._init_1(*args)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":243
 *           - Cython signature: void CFace(int, int, int)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==3) and (isinstance(args[0], (int, long))) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))):
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":245
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==3) and (isinstance(args[0], (int, long))) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         else:
 */
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 245, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_5 == 3) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = PyInt_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = PyLong_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L7_bool_binop_done:;
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 1);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = PyInt_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 1);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = PyLong_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_7 != 0);
  __pyx_t_6 = __pyx_t_1;
  __pyx_L10_bool_binop_done:;
  __pyx_t_1 = (__pyx_t_6 != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 2);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = PyInt_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L12_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 2);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = PyLong_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L12_bool_binop_done:;
  __pyx_t_6 = (__pyx_t_1 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (likely(__pyx_t_2)) {

    /* "geodesic_chenhan.pyx":246
 *              self._init_0(*args)
 *         elif (len(args)==3) and (isinstance(args[0], (int, long))) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))):
 *              self._init_1(*args)             # <<<<<<<<<<<<<<
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "geodesic_chenhan.pyx":245
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==3) and (isinstance(args[0], (int, long))) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":248
 *              self._init_1(*args)
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))             # <<<<<<<<<<<<<<
 * 
 *     def setIndices(self,  in_0 ,  in_1 ,  in_2 ):
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_args), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_not_handle_type_of, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 248, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "geodesic_chenhan.pyx":238
 *         self.inst = shared_ptr[_CFace](new _CFace((<int>in_0), (<int>in_1), (<int>in_2)))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void CFace()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("geodesic_chenhan.CFace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":250
 *                raise Exception('can not handle type of %s' % (args,))
 * 
 *     def setIndices(self,  in_0 ,  in_1 ,  in_2 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void setIndices(int, int, int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_9setIndices(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_5CFace_8setIndices[] = "Cython signature: void setIndices(int, int, int)";
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_9setIndices(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_0 = 0;
  PyObject *__pyx_v_in_1 = 0;
  PyObject *__pyx_v_in_2 = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setIndices (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_0,&__pyx_n_s_in_1,&__pyx_n_s_in_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_0)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setIndices", 1, 3, 3, 1); __PYX_ERR(1, 250, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setIndices", 1, 3, 3, 2); __PYX_ERR(1, 250, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setIndices") < 0)) __PYX_ERR(1, 250, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_in_0 = values[0];
    __pyx_v_in_1 = values[1];
    __pyx_v_in_2 = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setIndices", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 250, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CFace.setIndices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CFace_8setIndices(((struct __pyx_obj_16geodesic_chenhan_CFace *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1, __pyx_v_in_2);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_8setIndices(struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self, PyObject *__pyx_v_in_0, PyObject *__pyx_v_in_1, PyObject *__pyx_v_in_2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setIndices", 0);

  /* "geodesic_chenhan.pyx":252
 *     def setIndices(self,  in_0 ,  in_1 ,  in_2 ):
 *         """Cython signature: void setIndices(int, int, int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 252, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":253
 *         """Cython signature: void setIndices(int, int, int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_1); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_1); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_1_wrong_type);
      __PYX_ERR(1, 253, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":254
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_2); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_2); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L7_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_2_wrong_type);
      __PYX_ERR(1, 254, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":258
 * 
 * 
 *         self.inst.get().setIndices((<int>in_0), (<int>in_1), (<int>in_2))             # <<<<<<<<<<<<<<
 * 
 * cdef class CICHWithFurtherPriorityQueue:
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 258, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 258, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_in_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 258, __pyx_L1_error)
  __pyx_v_self->inst.get()->setIndices(((int)__pyx_t_4), ((int)__pyx_t_5), ((int)__pyx_t_6));

  /* "geodesic_chenhan.pyx":250
 *                raise Exception('can not handle type of %s' % (args,))
 * 
 *     def setIndices(self,  in_0 ,  in_1 ,  in_2 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void setIndices(int, int, int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CFace.setIndices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CFace_10__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_CFace *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CFace.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_5CFace_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_5CFace_12__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_CFace *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_5CFace_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CFace.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":268
 *     cdef shared_ptr[_CICHWithFurtherPriorityQueue] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue___dealloc__(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue___dealloc__(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":269
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":268
 *     cdef shared_ptr[_CICHWithFurtherPriorityQueue] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":272
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CICHWithFurtherPriorityQueue(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_2__init__[] = "Cython signature: void CICHWithFurtherPriorityQueue(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_2__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_inputModel = 0;
  PyObject *__pyx_v_indexOfSourceVerts = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inputModel,&__pyx_n_s_indexOfSourceVerts,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputModel)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexOfSourceVerts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 272, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 272, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_inputModel = ((struct __pyx_obj_16geodesic_chenhan_CRichModel *)values[0]);
    __pyx_v_indexOfSourceVerts = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 272, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inputModel), __pyx_ptype_16geodesic_chenhan_CRichModel, 1, "inputModel", 0))) __PYX_ERR(1, 272, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexOfSourceVerts), (&PySet_Type), 1, "indexOfSourceVerts", 1))) __PYX_ERR(1, 272, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_2__init__(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self), __pyx_v_inputModel, __pyx_v_indexOfSourceVerts);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8__init___2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":275
 *         """Cython signature: void CICHWithFurtherPriorityQueue(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 */

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8__init___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_4_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 275, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8__init___2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8__init___2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 275, __pyx_L1_error)
  __pyx_t_2 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_indexOfSourceVerts)) { __Pyx_RaiseClosureNameError("indexOfSourceVerts"); __PYX_ERR(1, 275, __pyx_L1_error) }
  __pyx_t_5 = __Pyx_set_iterator(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_indexOfSourceVerts, 1, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_6 = __Pyx_set_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, __pyx_t_4);
    if (unlikely(__pyx_t_6 == 0)) break;
    if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_li);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_li, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_8 = PyInt_Check(__pyx_cur_scope->__pyx_v_li); 
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_9 = PyLong_Check(__pyx_cur_scope->__pyx_v_li); 
    __pyx_t_8 = (__pyx_t_9 != 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L7_bool_binop_done:;
    __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0);
    if (__pyx_t_8) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":272
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CICHWithFurtherPriorityQueue(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */

static int __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_2__init__(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_inputModel, PyObject *__pyx_v_indexOfSourceVerts) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *__pyx_cur_scope;
  std::set<int>  __pyx_v_v1;
  PyObject *__pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8__init___2generator2 = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::set<int>  __pyx_t_6;
  CICHWithFurtherPriorityQueue *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_3___init__(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_3___init__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 272, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_indexOfSourceVerts = __pyx_v_indexOfSourceVerts;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_indexOfSourceVerts);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_indexOfSourceVerts);

  /* "geodesic_chenhan.pyx":274
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):
 *         """Cython signature: void CICHWithFurtherPriorityQueue(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_inputModel), __pyx_ptype_16geodesic_chenhan_CRichModel); 
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_inputModel_wrong_type);
      __PYX_ERR(1, 274, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":275
 *         """Cython signature: void CICHWithFurtherPriorityQueue(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_indexOfSourceVerts;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PySet_Check(__pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_2 = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 275, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_indexOfSourceVerts_wrong_typ);
      __PYX_ERR(1, 275, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":277
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts             # <<<<<<<<<<<<<<
 *         self.inst = shared_ptr[_CICHWithFurtherPriorityQueue](new _CICHWithFurtherPriorityQueue((deref(inputModel.inst.get())), v1))
 * 
 */
  __pyx_t_6 = __pyx_convert_set_from_py_int(__pyx_cur_scope->__pyx_v_indexOfSourceVerts); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 277, __pyx_L1_error)
  __pyx_v_v1 = __pyx_t_6;

  /* "geodesic_chenhan.pyx":278
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 *         self.inst = shared_ptr[_CICHWithFurtherPriorityQueue](new _CICHWithFurtherPriorityQueue((deref(inputModel.inst.get())), v1))             # <<<<<<<<<<<<<<
 * 
 *     def GetRootSourceOfVert(self,  index ):
 */
  try {
    __pyx_t_7 = new CICHWithFurtherPriorityQueue((*__pyx_v_inputModel->inst.get()), __pyx_v_v1);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 278, __pyx_L1_error)
  }
  __pyx_v_self->inst = boost::shared_ptr<CICHWithFurtherPriorityQueue> (__pyx_t_7);

  /* "geodesic_chenhan.pyx":272
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CICHWithFurtherPriorityQueue(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8__init___2generator2);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":280
 *         self.inst = shared_ptr[_CICHWithFurtherPriorityQueue](new _CICHWithFurtherPriorityQueue((deref(inputModel.inst.get())), v1))
 * 
 *     def GetRootSourceOfVert(self,  index ):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetRootSourceOfVert(int index)"""
 *         assert isinstance(index, (int, long)), 'arg index wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_5GetRootSourceOfVert(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_4GetRootSourceOfVert[] = "Cython signature: int GetRootSourceOfVert(int index)";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_5GetRootSourceOfVert(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetRootSourceOfVert (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_4GetRootSourceOfVert(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_4GetRootSourceOfVert(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, PyObject *__pyx_v_index) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetRootSourceOfVert", 0);

  /* "geodesic_chenhan.pyx":282
 *     def GetRootSourceOfVert(self,  index ):
 *         """Cython signature: int GetRootSourceOfVert(int index)"""
 *         assert isinstance(index, (int, long)), 'arg index wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_index); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_index); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_index_wrong_type);
      __PYX_ERR(1, 282, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":284
 *         assert isinstance(index, (int, long)), 'arg index wrong type'
 * 
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 284, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->GetRootSourceOfVert(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":285
 * 
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":286
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":280
 *         self.inst = shared_ptr[_CICHWithFurtherPriorityQueue](new _CICHWithFurtherPriorityQueue((deref(inputModel.inst.get())), v1))
 * 
 *     def GetRootSourceOfVert(self,  index ):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetRootSourceOfVert(int index)"""
 *         assert isinstance(index, (int, long)), 'arg index wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.GetRootSourceOfVert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":288
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_7FindSourceVertex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_6FindSourceVertex[] = "Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_7FindSourceVertex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_indexOfVert = 0;
  PyObject *__pyx_v_resultingPath = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FindSourceVertex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_indexOfVert,&__pyx_n_s_resultingPath,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexOfVert)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultingPath)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("FindSourceVertex", 1, 2, 2, 1); __PYX_ERR(1, 288, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "FindSourceVertex") < 0)) __PYX_ERR(1, 288, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_indexOfVert = values[0];
    __pyx_v_resultingPath = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("FindSourceVertex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 288, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.FindSourceVertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_resultingPath), (&PyList_Type), 1, "resultingPath", 1))) __PYX_ERR(1, 288, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_6FindSourceVertex(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self), __pyx_v_indexOfVert, __pyx_v_resultingPath);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16FindSourceVertex_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":291
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 */

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16FindSourceVertex_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_6_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 291, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16FindSourceVertex_2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_FindSourceVertex_locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 291, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.FindSourceVertex.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16FindSourceVertex_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 291, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_resultingPath)) { __Pyx_RaiseClosureNameError("resultingPath"); __PYX_ERR(1, 291, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_resultingPath == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 291, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_resultingPath; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 291, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elemt_rec);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_ptype_16geodesic_chenhan_EdgePoint); 
    __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
    if (__pyx_t_5) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":288
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_6FindSourceVertex(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, PyObject *__pyx_v_indexOfVert, PyObject *__pyx_v_resultingPath) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *__pyx_cur_scope;
  std::vector<EdgePoint>  *__pyx_v_v1;
  struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_item1 = 0;
  std::vector<EdgePoint>  __pyx_v__r;
  PyObject *__pyx_v_py_result = NULL;
  std::vector<EdgePoint> ::iterator __pyx_v_it__r;
  struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_item_py_result = 0;
  PyObject *__pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16FindSourceVertex_2generator3 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  std::vector<EdgePoint>  *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FindSourceVertex", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 288, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_resultingPath = __pyx_v_resultingPath;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_resultingPath);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_resultingPath);

  /* "geodesic_chenhan.pyx":290
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_indexOfVert); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_indexOfVert); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_indexOfVert_wrong_type);
      __PYX_ERR(1, 290, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":291
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_4 = __pyx_cur_scope->__pyx_v_resultingPath;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_2 = PyList_Check(__pyx_t_4); 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_4 = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16FindSourceVertex_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 291, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_L5_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_resultingPath_wrong_type);
      __PYX_ERR(1, 291, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":293
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()             # <<<<<<<<<<<<<<
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:
 */
  try {
    __pyx_t_6 = new std::vector<EdgePoint> ();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 293, __pyx_L1_error)
  }
  __pyx_v_v1 = __pyx_t_6;

  /* "geodesic_chenhan.pyx":295
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 */
  if (unlikely(__pyx_cur_scope->__pyx_v_resultingPath == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 295, __pyx_L1_error)
  }
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_resultingPath; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 295, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 295, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_16geodesic_chenhan_EdgePoint))))) __PYX_ERR(1, 295, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_item1, ((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":296
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:
 *             v1.push_back(deref(item1.inst.get()))             # <<<<<<<<<<<<<<
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 *         del v1
 */
    try {
      __pyx_v_v1->push_back((*__pyx_v_item1->inst.get()));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 296, __pyx_L1_error)
    }

    /* "geodesic_chenhan.pyx":295
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "geodesic_chenhan.pyx":297
 *         for item1 in resultingPath:
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))             # <<<<<<<<<<<<<<
 *         del v1
 *         py_result = []
 */
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_indexOfVert); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 297, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->FindSourceVertex(((int)__pyx_t_8), (*__pyx_v_v1));

  /* "geodesic_chenhan.pyx":298
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 *         del v1             # <<<<<<<<<<<<<<
 *         py_result = []
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()
 */
  delete __pyx_v_v1;

  /* "geodesic_chenhan.pyx":299
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 *         del v1
 *         py_result = []             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()
 *         cdef EdgePoint item_py_result
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_py_result = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "geodesic_chenhan.pyx":300
 *         del v1
 *         py_result = []
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()             # <<<<<<<<<<<<<<
 *         cdef EdgePoint item_py_result
 *         while it__r != _r.end():
 */
  __pyx_v_it__r = __pyx_v__r.begin();

  /* "geodesic_chenhan.pyx":302
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()
 *         cdef EdgePoint item_py_result
 *         while it__r != _r.end():             # <<<<<<<<<<<<<<
 *            item_py_result = EdgePoint.__new__(EdgePoint)
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_it__r != __pyx_v__r.end()) != 0);
    if (!__pyx_t_1) break;

    /* "geodesic_chenhan.pyx":303
 *         cdef EdgePoint item_py_result
 *         while it__r != _r.end():
 *            item_py_result = EdgePoint.__new__(EdgePoint)             # <<<<<<<<<<<<<<
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 *            py_result.append(item_py_result)
 */
    __pyx_t_5 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_EdgePoint(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_EdgePoint), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 303, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __Pyx_XDECREF_SET(__pyx_v_item_py_result, ((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "geodesic_chenhan.pyx":304
 *         while it__r != _r.end():
 *            item_py_result = EdgePoint.__new__(EdgePoint)
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))             # <<<<<<<<<<<<<<
 *            py_result.append(item_py_result)
 *            inc(it__r)
 */
    __pyx_v_item_py_result->inst = boost::shared_ptr<EdgePoint> (new EdgePoint((*__pyx_v_it__r)));

    /* "geodesic_chenhan.pyx":305
 *            item_py_result = EdgePoint.__new__(EdgePoint)
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 *            py_result.append(item_py_result)             # <<<<<<<<<<<<<<
 *            inc(it__r)
 *         return py_result
 */
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_py_result, ((PyObject *)__pyx_v_item_py_result)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 305, __pyx_L1_error)

    /* "geodesic_chenhan.pyx":306
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 *            py_result.append(item_py_result)
 *            inc(it__r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
    (void)((++__pyx_v_it__r));
  }

  /* "geodesic_chenhan.pyx":307
 *            py_result.append(item_py_result)
 *            inc(it__r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def PickShortestPaths(self,  num ):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_py_result);
  __pyx_r = __pyx_v_py_result;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":288
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.FindSourceVertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_item1);
  __Pyx_XDECREF(__pyx_v_py_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_item_py_result);
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16FindSourceVertex_2generator3);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":309
 *         return py_result
 * 
 *     def PickShortestPaths(self,  num ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void PickShortestPaths(int num)"""
 *         assert isinstance(num, (int, long)), 'arg num wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_9PickShortestPaths(PyObject *__pyx_v_self, PyObject *__pyx_v_num); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8PickShortestPaths[] = "Cython signature: void PickShortestPaths(int num)";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_9PickShortestPaths(PyObject *__pyx_v_self, PyObject *__pyx_v_num) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("PickShortestPaths (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8PickShortestPaths(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self), ((PyObject *)__pyx_v_num));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8PickShortestPaths(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, PyObject *__pyx_v_num) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PickShortestPaths", 0);

  /* "geodesic_chenhan.pyx":311
 *     def PickShortestPaths(self,  num ):
 *         """Cython signature: void PickShortestPaths(int num)"""
 *         assert isinstance(num, (int, long)), 'arg num wrong type'             # <<<<<<<<<<<<<<
 * 
 *         self.inst.get().PickShortestPaths((<int>num))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_num); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_num); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_num_wrong_type);
      __PYX_ERR(1, 311, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":313
 *         assert isinstance(num, (int, long)), 'arg num wrong type'
 * 
 *         self.inst.get().PickShortestPaths((<int>num))             # <<<<<<<<<<<<<<
 * 
 *     def Execute(self):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_num); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 313, __pyx_L1_error)
  __pyx_v_self->inst.get()->PickShortestPaths(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":309
 *         return py_result
 * 
 *     def PickShortestPaths(self,  num ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void PickShortestPaths(int num)"""
 *         assert isinstance(num, (int, long)), 'arg num wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.PickShortestPaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":315
 *         self.inst.get().PickShortestPaths((<int>num))
 * 
 *     def Execute(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Execute()"""
 *         self.inst.get().Execute()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_11Execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_10Execute[] = "Cython signature: void Execute()";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_11Execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Execute (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_10Execute(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_10Execute(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Execute", 0);

  /* "geodesic_chenhan.pyx":317
 *     def Execute(self):
 *         """Cython signature: void Execute()"""
 *         self.inst.get().Execute()             # <<<<<<<<<<<<<<
 * 
 *     def GetRunTime(self):
 */
  __pyx_v_self->inst.get()->Execute();

  /* "geodesic_chenhan.pyx":315
 *         self.inst.get().PickShortestPaths((<int>num))
 * 
 *     def Execute(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Execute()"""
 *         self.inst.get().Execute()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":319
 *         self.inst.get().Execute()
 * 
 *     def GetRunTime(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_13GetRunTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_12GetRunTime[] = "Cython signature: double GetRunTime()";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_13GetRunTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetRunTime (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_12GetRunTime(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_12GetRunTime(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetRunTime", 0);

  /* "geodesic_chenhan.pyx":321
 *     def GetRunTime(self):
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetRunTime();

  /* "geodesic_chenhan.pyx":322
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":323
 *         cdef double _r = self.inst.get().GetRunTime()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetMemoryCost(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":319
 *         self.inst.get().Execute()
 * 
 *     def GetRunTime(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.GetRunTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":325
 *         return py_result
 * 
 *     def GetMemoryCost(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_15GetMemoryCost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_14GetMemoryCost[] = "Cython signature: double GetMemoryCost()";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_15GetMemoryCost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetMemoryCost (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_14GetMemoryCost(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_14GetMemoryCost(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetMemoryCost", 0);

  /* "geodesic_chenhan.pyx":327
 *     def GetMemoryCost(self):
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetMemoryCost();

  /* "geodesic_chenhan.pyx":328
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":329
 *         cdef double _r = self.inst.get().GetMemoryCost()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetWindowNum(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":325
 *         return py_result
 * 
 *     def GetMemoryCost(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.GetMemoryCost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":331
 *         return py_result
 * 
 *     def GetWindowNum(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_17GetWindowNum(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16GetWindowNum[] = "Cython signature: int GetWindowNum()";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_17GetWindowNum(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetWindowNum (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16GetWindowNum(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16GetWindowNum(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetWindowNum", 0);

  /* "geodesic_chenhan.pyx":333
 *     def GetWindowNum(self):
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetWindowNum();

  /* "geodesic_chenhan.pyx":334
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":335
 *         cdef int _r = self.inst.get().GetWindowNum()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetMaxLenOfQue(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":331
 *         return py_result
 * 
 *     def GetWindowNum(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.GetWindowNum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":337
 *         return py_result
 * 
 *     def GetMaxLenOfQue(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_19GetMaxLenOfQue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_18GetMaxLenOfQue[] = "Cython signature: int GetMaxLenOfQue()";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_19GetMaxLenOfQue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetMaxLenOfQue (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_18GetMaxLenOfQue(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_18GetMaxLenOfQue(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetMaxLenOfQue", 0);

  /* "geodesic_chenhan.pyx":339
 *     def GetMaxLenOfQue(self):
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetMaxLenOfQue();

  /* "geodesic_chenhan.pyx":340
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":341
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNPE(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":337
 *         return py_result
 * 
 *     def GetMaxLenOfQue(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.GetMaxLenOfQue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":343
 *         return py_result
 * 
 *     def GetNPE(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_21GetNPE(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_20GetNPE[] = "Cython signature: double GetNPE()";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_21GetNPE(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNPE (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_20GetNPE(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_20GetNPE(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNPE", 0);

  /* "geodesic_chenhan.pyx":345
 *     def GetNPE(self):
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNPE();

  /* "geodesic_chenhan.pyx":346
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":347
 *         cdef double _r = self.inst.get().GetNPE()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetDepthOfSequenceTree(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":343
 *         return py_result
 * 
 *     def GetNPE(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.GetNPE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":349
 *         return py_result
 * 
 *     def GetDepthOfSequenceTree(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_23GetDepthOfSequenceTree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_22GetDepthOfSequenceTree[] = "Cython signature: int GetDepthOfSequenceTree()";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_23GetDepthOfSequenceTree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetDepthOfSequenceTree (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_22GetDepthOfSequenceTree(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_22GetDepthOfSequenceTree(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetDepthOfSequenceTree", 0);

  /* "geodesic_chenhan.pyx":351
 *     def GetDepthOfSequenceTree(self):
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetDepthOfSequenceTree();

  /* "geodesic_chenhan.pyx":352
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":353
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def HasBeenCompleted(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":349
 *         return py_result
 * 
 *     def GetDepthOfSequenceTree(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.GetDepthOfSequenceTree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":355
 *         return py_result
 * 
 *     def HasBeenCompleted(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_25HasBeenCompleted(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_24HasBeenCompleted[] = "Cython signature: bool HasBeenCompleted()";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_25HasBeenCompleted(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasBeenCompleted (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_24HasBeenCompleted(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_24HasBeenCompleted(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("HasBeenCompleted", 0);

  /* "geodesic_chenhan.pyx":357
 *     def HasBeenCompleted(self):
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->HasBeenCompleted();

  /* "geodesic_chenhan.pyx":358
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":359
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetVertexDistances(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":355
 *         return py_result
 * 
 *     def HasBeenCompleted(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.HasBeenCompleted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":361
 *         return py_result
 * 
 *     def GetVertexDistances(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_27GetVertexDistances(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_26GetVertexDistances[] = "Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()";
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_27GetVertexDistances(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetVertexDistances (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_26GetVertexDistances(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_26GetVertexDistances(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  std::vector<InfoAtVertex>  __pyx_v__r;
  PyObject *__pyx_v_py_result = NULL;
  std::vector<InfoAtVertex> ::iterator __pyx_v_it__r;
  struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_item_py_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetVertexDistances", 0);

  /* "geodesic_chenhan.pyx":363
 *     def GetVertexDistances(self):
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()             # <<<<<<<<<<<<<<
 *         py_result = []
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetVertexDistances();

  /* "geodesic_chenhan.pyx":364
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()
 *         py_result = []             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()
 *         cdef InfoAtVertex item_py_result
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_py_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "geodesic_chenhan.pyx":365
 *         _r = self.inst.get().GetVertexDistances()
 *         py_result = []
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()             # <<<<<<<<<<<<<<
 *         cdef InfoAtVertex item_py_result
 *         while it__r != _r.end():
 */
  __pyx_v_it__r = __pyx_v__r.begin();

  /* "geodesic_chenhan.pyx":367
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()
 *         cdef InfoAtVertex item_py_result
 *         while it__r != _r.end():             # <<<<<<<<<<<<<<
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_it__r != __pyx_v__r.end()) != 0);
    if (!__pyx_t_2) break;

    /* "geodesic_chenhan.pyx":368
 *         cdef InfoAtVertex item_py_result
 *         while it__r != _r.end():
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)             # <<<<<<<<<<<<<<
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 *            py_result.append(item_py_result)
 */
    __pyx_t_1 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_InfoAtVertex(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_InfoAtVertex), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 368, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_XDECREF_SET(__pyx_v_item_py_result, ((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "geodesic_chenhan.pyx":369
 *         while it__r != _r.end():
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))             # <<<<<<<<<<<<<<
 *            py_result.append(item_py_result)
 *            inc(it__r)
 */
    __pyx_v_item_py_result->inst = boost::shared_ptr<InfoAtVertex> (new InfoAtVertex((*__pyx_v_it__r)));

    /* "geodesic_chenhan.pyx":370
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 *            py_result.append(item_py_result)             # <<<<<<<<<<<<<<
 *            inc(it__r)
 *         return py_result
 */
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_py_result, ((PyObject *)__pyx_v_item_py_result)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 370, __pyx_L1_error)

    /* "geodesic_chenhan.pyx":371
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 *            py_result.append(item_py_result)
 *            inc(it__r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
    (void)((++__pyx_v_it__r));
  }

  /* "geodesic_chenhan.pyx":372
 *            py_result.append(item_py_result)
 *            inc(it__r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 * cdef class CImprovedCHWithEdgeValve:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_py_result);
  __pyx_r = __pyx_v_py_result;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":361
 *         return py_result
 * 
 *     def GetVertexDistances(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.GetVertexDistances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_py_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_item_py_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_28__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_30__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CICHWithFurtherPriorityQueue.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":382
 *     cdef shared_ptr[_CImprovedCHWithEdgeValve] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve___dealloc__(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve___dealloc__(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":383
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":382
 *     cdef shared_ptr[_CImprovedCHWithEdgeValve] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":386
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CImprovedCHWithEdgeValve(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_2__init__[] = "Cython signature: void CImprovedCHWithEdgeValve(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_24CImprovedCHWithEdgeValve_2__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_inputModel = 0;
  PyObject *__pyx_v_indexOfSourceVerts = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inputModel,&__pyx_n_s_indexOfSourceVerts,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputModel)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexOfSourceVerts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 386, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 386, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_inputModel = ((struct __pyx_obj_16geodesic_chenhan_CRichModel *)values[0]);
    __pyx_v_indexOfSourceVerts = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 386, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inputModel), __pyx_ptype_16geodesic_chenhan_CRichModel, 1, "inputModel", 0))) __PYX_ERR(1, 386, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexOfSourceVerts), (&PySet_Type), 1, "indexOfSourceVerts", 1))) __PYX_ERR(1, 386, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_2__init__(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self), __pyx_v_inputModel, __pyx_v_indexOfSourceVerts);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8__init___2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":389
 *         """Cython signature: void CImprovedCHWithEdgeValve(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 */

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8__init___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_8_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_8_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 389, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8__init___2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 389, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8__init___2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 389, __pyx_L1_error)
  __pyx_t_2 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_indexOfSourceVerts)) { __Pyx_RaiseClosureNameError("indexOfSourceVerts"); __PYX_ERR(1, 389, __pyx_L1_error) }
  __pyx_t_5 = __Pyx_set_iterator(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_indexOfSourceVerts, 1, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_6 = __Pyx_set_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, __pyx_t_4);
    if (unlikely(__pyx_t_6 == 0)) break;
    if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(1, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_li);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_li, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_8 = PyInt_Check(__pyx_cur_scope->__pyx_v_li); 
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_9 = PyLong_Check(__pyx_cur_scope->__pyx_v_li); 
    __pyx_t_8 = (__pyx_t_9 != 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L7_bool_binop_done:;
    __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0);
    if (__pyx_t_8) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":386
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CImprovedCHWithEdgeValve(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */

static int __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_2__init__(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_inputModel, PyObject *__pyx_v_indexOfSourceVerts) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *__pyx_cur_scope;
  std::set<int>  __pyx_v_v1;
  PyObject *__pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8__init___2generator4 = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::set<int>  __pyx_t_6;
  CImprovedCHWithEdgeValve *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_7___init__(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_7___init__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 386, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_indexOfSourceVerts = __pyx_v_indexOfSourceVerts;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_indexOfSourceVerts);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_indexOfSourceVerts);

  /* "geodesic_chenhan.pyx":388
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):
 *         """Cython signature: void CImprovedCHWithEdgeValve(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_inputModel), __pyx_ptype_16geodesic_chenhan_CRichModel); 
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_inputModel_wrong_type);
      __PYX_ERR(1, 388, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":389
 *         """Cython signature: void CImprovedCHWithEdgeValve(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_indexOfSourceVerts;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PySet_Check(__pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_2 = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 389, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_indexOfSourceVerts_wrong_typ);
      __PYX_ERR(1, 389, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":391
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts             # <<<<<<<<<<<<<<
 *         self.inst = shared_ptr[_CImprovedCHWithEdgeValve](new _CImprovedCHWithEdgeValve((deref(inputModel.inst.get())), v1))
 * 
 */
  __pyx_t_6 = __pyx_convert_set_from_py_int(__pyx_cur_scope->__pyx_v_indexOfSourceVerts); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 391, __pyx_L1_error)
  __pyx_v_v1 = __pyx_t_6;

  /* "geodesic_chenhan.pyx":392
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 *         self.inst = shared_ptr[_CImprovedCHWithEdgeValve](new _CImprovedCHWithEdgeValve((deref(inputModel.inst.get())), v1))             # <<<<<<<<<<<<<<
 * 
 *     def GetRootSourceOfVert(self,  index ):
 */
  try {
    __pyx_t_7 = new CImprovedCHWithEdgeValve((*__pyx_v_inputModel->inst.get()), __pyx_v_v1);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 392, __pyx_L1_error)
  }
  __pyx_v_self->inst = boost::shared_ptr<CImprovedCHWithEdgeValve> (__pyx_t_7);

  /* "geodesic_chenhan.pyx":386
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CImprovedCHWithEdgeValve(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8__init___2generator4);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":394
 *         self.inst = shared_ptr[_CImprovedCHWithEdgeValve](new _CImprovedCHWithEdgeValve((deref(inputModel.inst.get())), v1))
 * 
 *     def GetRootSourceOfVert(self,  index ):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetRootSourceOfVert(int index)"""
 *         assert isinstance(index, (int, long)), 'arg index wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_5GetRootSourceOfVert(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_4GetRootSourceOfVert[] = "Cython signature: int GetRootSourceOfVert(int index)";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_5GetRootSourceOfVert(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetRootSourceOfVert (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_4GetRootSourceOfVert(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_4GetRootSourceOfVert(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, PyObject *__pyx_v_index) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetRootSourceOfVert", 0);

  /* "geodesic_chenhan.pyx":396
 *     def GetRootSourceOfVert(self,  index ):
 *         """Cython signature: int GetRootSourceOfVert(int index)"""
 *         assert isinstance(index, (int, long)), 'arg index wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_index); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_index); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_index_wrong_type);
      __PYX_ERR(1, 396, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":398
 *         assert isinstance(index, (int, long)), 'arg index wrong type'
 * 
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 398, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->GetRootSourceOfVert(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":399
 * 
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":400
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":394
 *         self.inst = shared_ptr[_CImprovedCHWithEdgeValve](new _CImprovedCHWithEdgeValve((deref(inputModel.inst.get())), v1))
 * 
 *     def GetRootSourceOfVert(self,  index ):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetRootSourceOfVert(int index)"""
 *         assert isinstance(index, (int, long)), 'arg index wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.GetRootSourceOfVert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":402
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_7FindSourceVertex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_6FindSourceVertex[] = "Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_7FindSourceVertex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_indexOfVert = 0;
  PyObject *__pyx_v_resultingPath = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FindSourceVertex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_indexOfVert,&__pyx_n_s_resultingPath,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexOfVert)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultingPath)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("FindSourceVertex", 1, 2, 2, 1); __PYX_ERR(1, 402, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "FindSourceVertex") < 0)) __PYX_ERR(1, 402, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_indexOfVert = values[0];
    __pyx_v_resultingPath = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("FindSourceVertex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 402, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.FindSourceVertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_resultingPath), (&PyList_Type), 1, "resultingPath", 1))) __PYX_ERR(1, 402, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_6FindSourceVertex(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self), __pyx_v_indexOfVert, __pyx_v_resultingPath);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16FindSourceVertex_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":405
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 */

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16FindSourceVertex_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_10_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_10_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 405, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16FindSourceVertex_2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_FindSourceVertex_locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 405, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.FindSourceVertex.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16FindSourceVertex_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 405, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_resultingPath)) { __Pyx_RaiseClosureNameError("resultingPath"); __PYX_ERR(1, 405, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_resultingPath == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 405, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_resultingPath; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 405, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elemt_rec);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_ptype_16geodesic_chenhan_EdgePoint); 
    __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
    if (__pyx_t_5) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":402
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_6FindSourceVertex(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, PyObject *__pyx_v_indexOfVert, PyObject *__pyx_v_resultingPath) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *__pyx_cur_scope;
  std::vector<EdgePoint>  *__pyx_v_v1;
  struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_item1 = 0;
  std::vector<EdgePoint>  __pyx_v__r;
  PyObject *__pyx_v_py_result = NULL;
  std::vector<EdgePoint> ::iterator __pyx_v_it__r;
  struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_item_py_result = 0;
  PyObject *__pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16FindSourceVertex_2generator5 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  std::vector<EdgePoint>  *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FindSourceVertex", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 402, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_resultingPath = __pyx_v_resultingPath;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_resultingPath);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_resultingPath);

  /* "geodesic_chenhan.pyx":404
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_indexOfVert); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_indexOfVert); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_indexOfVert_wrong_type);
      __PYX_ERR(1, 404, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":405
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_4 = __pyx_cur_scope->__pyx_v_resultingPath;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_2 = PyList_Check(__pyx_t_4); 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_4 = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16FindSourceVertex_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 405, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_L5_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_resultingPath_wrong_type);
      __PYX_ERR(1, 405, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":407
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()             # <<<<<<<<<<<<<<
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:
 */
  try {
    __pyx_t_6 = new std::vector<EdgePoint> ();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 407, __pyx_L1_error)
  }
  __pyx_v_v1 = __pyx_t_6;

  /* "geodesic_chenhan.pyx":409
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 */
  if (unlikely(__pyx_cur_scope->__pyx_v_resultingPath == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 409, __pyx_L1_error)
  }
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_resultingPath; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 409, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 409, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_16geodesic_chenhan_EdgePoint))))) __PYX_ERR(1, 409, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_item1, ((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":410
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:
 *             v1.push_back(deref(item1.inst.get()))             # <<<<<<<<<<<<<<
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 *         del v1
 */
    try {
      __pyx_v_v1->push_back((*__pyx_v_item1->inst.get()));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 410, __pyx_L1_error)
    }

    /* "geodesic_chenhan.pyx":409
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "geodesic_chenhan.pyx":411
 *         for item1 in resultingPath:
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))             # <<<<<<<<<<<<<<
 *         del v1
 *         py_result = []
 */
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_indexOfVert); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 411, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->FindSourceVertex(((int)__pyx_t_8), (*__pyx_v_v1));

  /* "geodesic_chenhan.pyx":412
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 *         del v1             # <<<<<<<<<<<<<<
 *         py_result = []
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()
 */
  delete __pyx_v_v1;

  /* "geodesic_chenhan.pyx":413
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 *         del v1
 *         py_result = []             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()
 *         cdef EdgePoint item_py_result
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_py_result = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "geodesic_chenhan.pyx":414
 *         del v1
 *         py_result = []
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()             # <<<<<<<<<<<<<<
 *         cdef EdgePoint item_py_result
 *         while it__r != _r.end():
 */
  __pyx_v_it__r = __pyx_v__r.begin();

  /* "geodesic_chenhan.pyx":416
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()
 *         cdef EdgePoint item_py_result
 *         while it__r != _r.end():             # <<<<<<<<<<<<<<
 *            item_py_result = EdgePoint.__new__(EdgePoint)
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_it__r != __pyx_v__r.end()) != 0);
    if (!__pyx_t_1) break;

    /* "geodesic_chenhan.pyx":417
 *         cdef EdgePoint item_py_result
 *         while it__r != _r.end():
 *            item_py_result = EdgePoint.__new__(EdgePoint)             # <<<<<<<<<<<<<<
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 *            py_result.append(item_py_result)
 */
    __pyx_t_5 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_EdgePoint(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_EdgePoint), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 417, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __Pyx_XDECREF_SET(__pyx_v_item_py_result, ((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "geodesic_chenhan.pyx":418
 *         while it__r != _r.end():
 *            item_py_result = EdgePoint.__new__(EdgePoint)
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))             # <<<<<<<<<<<<<<
 *            py_result.append(item_py_result)
 *            inc(it__r)
 */
    __pyx_v_item_py_result->inst = boost::shared_ptr<EdgePoint> (new EdgePoint((*__pyx_v_it__r)));

    /* "geodesic_chenhan.pyx":419
 *            item_py_result = EdgePoint.__new__(EdgePoint)
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 *            py_result.append(item_py_result)             # <<<<<<<<<<<<<<
 *            inc(it__r)
 *         return py_result
 */
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_py_result, ((PyObject *)__pyx_v_item_py_result)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 419, __pyx_L1_error)

    /* "geodesic_chenhan.pyx":420
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 *            py_result.append(item_py_result)
 *            inc(it__r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
    (void)((++__pyx_v_it__r));
  }

  /* "geodesic_chenhan.pyx":421
 *            py_result.append(item_py_result)
 *            inc(it__r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def PickShortestPaths(self,  num ):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_py_result);
  __pyx_r = __pyx_v_py_result;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":402
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.FindSourceVertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_item1);
  __Pyx_XDECREF(__pyx_v_py_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_item_py_result);
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16FindSourceVertex_2generator5);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":423
 *         return py_result
 * 
 *     def PickShortestPaths(self,  num ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void PickShortestPaths(int num)"""
 *         assert isinstance(num, (int, long)), 'arg num wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_9PickShortestPaths(PyObject *__pyx_v_self, PyObject *__pyx_v_num); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8PickShortestPaths[] = "Cython signature: void PickShortestPaths(int num)";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_9PickShortestPaths(PyObject *__pyx_v_self, PyObject *__pyx_v_num) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("PickShortestPaths (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8PickShortestPaths(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self), ((PyObject *)__pyx_v_num));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8PickShortestPaths(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, PyObject *__pyx_v_num) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PickShortestPaths", 0);

  /* "geodesic_chenhan.pyx":425
 *     def PickShortestPaths(self,  num ):
 *         """Cython signature: void PickShortestPaths(int num)"""
 *         assert isinstance(num, (int, long)), 'arg num wrong type'             # <<<<<<<<<<<<<<
 * 
 *         self.inst.get().PickShortestPaths((<int>num))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_num); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_num); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_num_wrong_type);
      __PYX_ERR(1, 425, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":427
 *         assert isinstance(num, (int, long)), 'arg num wrong type'
 * 
 *         self.inst.get().PickShortestPaths((<int>num))             # <<<<<<<<<<<<<<
 * 
 *     def Execute(self):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_num); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 427, __pyx_L1_error)
  __pyx_v_self->inst.get()->PickShortestPaths(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":423
 *         return py_result
 * 
 *     def PickShortestPaths(self,  num ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void PickShortestPaths(int num)"""
 *         assert isinstance(num, (int, long)), 'arg num wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.PickShortestPaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":429
 *         self.inst.get().PickShortestPaths((<int>num))
 * 
 *     def Execute(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Execute()"""
 *         self.inst.get().Execute()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_11Execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_10Execute[] = "Cython signature: void Execute()";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_11Execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Execute (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_10Execute(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_10Execute(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Execute", 0);

  /* "geodesic_chenhan.pyx":431
 *     def Execute(self):
 *         """Cython signature: void Execute()"""
 *         self.inst.get().Execute()             # <<<<<<<<<<<<<<
 * 
 *     def GetRunTime(self):
 */
  __pyx_v_self->inst.get()->Execute();

  /* "geodesic_chenhan.pyx":429
 *         self.inst.get().PickShortestPaths((<int>num))
 * 
 *     def Execute(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Execute()"""
 *         self.inst.get().Execute()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":433
 *         self.inst.get().Execute()
 * 
 *     def GetRunTime(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_13GetRunTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_12GetRunTime[] = "Cython signature: double GetRunTime()";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_13GetRunTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetRunTime (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_12GetRunTime(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_12GetRunTime(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetRunTime", 0);

  /* "geodesic_chenhan.pyx":435
 *     def GetRunTime(self):
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetRunTime();

  /* "geodesic_chenhan.pyx":436
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":437
 *         cdef double _r = self.inst.get().GetRunTime()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetMemoryCost(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":433
 *         self.inst.get().Execute()
 * 
 *     def GetRunTime(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.GetRunTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":439
 *         return py_result
 * 
 *     def GetMemoryCost(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_15GetMemoryCost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_14GetMemoryCost[] = "Cython signature: double GetMemoryCost()";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_15GetMemoryCost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetMemoryCost (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_14GetMemoryCost(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_14GetMemoryCost(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetMemoryCost", 0);

  /* "geodesic_chenhan.pyx":441
 *     def GetMemoryCost(self):
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetMemoryCost();

  /* "geodesic_chenhan.pyx":442
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":443
 *         cdef double _r = self.inst.get().GetMemoryCost()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetWindowNum(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":439
 *         return py_result
 * 
 *     def GetMemoryCost(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.GetMemoryCost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":445
 *         return py_result
 * 
 *     def GetWindowNum(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_17GetWindowNum(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16GetWindowNum[] = "Cython signature: int GetWindowNum()";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_17GetWindowNum(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetWindowNum (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16GetWindowNum(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16GetWindowNum(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetWindowNum", 0);

  /* "geodesic_chenhan.pyx":447
 *     def GetWindowNum(self):
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetWindowNum();

  /* "geodesic_chenhan.pyx":448
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":449
 *         cdef int _r = self.inst.get().GetWindowNum()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetMaxLenOfQue(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":445
 *         return py_result
 * 
 *     def GetWindowNum(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.GetWindowNum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":451
 *         return py_result
 * 
 *     def GetMaxLenOfQue(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_19GetMaxLenOfQue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_18GetMaxLenOfQue[] = "Cython signature: int GetMaxLenOfQue()";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_19GetMaxLenOfQue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetMaxLenOfQue (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_18GetMaxLenOfQue(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_18GetMaxLenOfQue(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetMaxLenOfQue", 0);

  /* "geodesic_chenhan.pyx":453
 *     def GetMaxLenOfQue(self):
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetMaxLenOfQue();

  /* "geodesic_chenhan.pyx":454
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":455
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNPE(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":451
 *         return py_result
 * 
 *     def GetMaxLenOfQue(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.GetMaxLenOfQue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":457
 *         return py_result
 * 
 *     def GetNPE(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_21GetNPE(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_20GetNPE[] = "Cython signature: double GetNPE()";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_21GetNPE(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNPE (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_20GetNPE(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_20GetNPE(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNPE", 0);

  /* "geodesic_chenhan.pyx":459
 *     def GetNPE(self):
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNPE();

  /* "geodesic_chenhan.pyx":460
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":461
 *         cdef double _r = self.inst.get().GetNPE()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetDepthOfSequenceTree(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":457
 *         return py_result
 * 
 *     def GetNPE(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.GetNPE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":463
 *         return py_result
 * 
 *     def GetDepthOfSequenceTree(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_23GetDepthOfSequenceTree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_22GetDepthOfSequenceTree[] = "Cython signature: int GetDepthOfSequenceTree()";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_23GetDepthOfSequenceTree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetDepthOfSequenceTree (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_22GetDepthOfSequenceTree(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_22GetDepthOfSequenceTree(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetDepthOfSequenceTree", 0);

  /* "geodesic_chenhan.pyx":465
 *     def GetDepthOfSequenceTree(self):
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetDepthOfSequenceTree();

  /* "geodesic_chenhan.pyx":466
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":467
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def HasBeenCompleted(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":463
 *         return py_result
 * 
 *     def GetDepthOfSequenceTree(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.GetDepthOfSequenceTree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":469
 *         return py_result
 * 
 *     def HasBeenCompleted(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_25HasBeenCompleted(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_24HasBeenCompleted[] = "Cython signature: bool HasBeenCompleted()";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_25HasBeenCompleted(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasBeenCompleted (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_24HasBeenCompleted(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_24HasBeenCompleted(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("HasBeenCompleted", 0);

  /* "geodesic_chenhan.pyx":471
 *     def HasBeenCompleted(self):
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->HasBeenCompleted();

  /* "geodesic_chenhan.pyx":472
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":473
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetVertexDistances(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":469
 *         return py_result
 * 
 *     def HasBeenCompleted(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.HasBeenCompleted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":475
 *         return py_result
 * 
 *     def GetVertexDistances(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_27GetVertexDistances(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_26GetVertexDistances[] = "Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()";
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_27GetVertexDistances(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetVertexDistances (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_26GetVertexDistances(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_26GetVertexDistances(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  std::vector<InfoAtVertex>  __pyx_v__r;
  PyObject *__pyx_v_py_result = NULL;
  std::vector<InfoAtVertex> ::iterator __pyx_v_it__r;
  struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_item_py_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetVertexDistances", 0);

  /* "geodesic_chenhan.pyx":477
 *     def GetVertexDistances(self):
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()             # <<<<<<<<<<<<<<
 *         py_result = []
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetVertexDistances();

  /* "geodesic_chenhan.pyx":478
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()
 *         py_result = []             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()
 *         cdef InfoAtVertex item_py_result
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_py_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "geodesic_chenhan.pyx":479
 *         _r = self.inst.get().GetVertexDistances()
 *         py_result = []
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()             # <<<<<<<<<<<<<<
 *         cdef InfoAtVertex item_py_result
 *         while it__r != _r.end():
 */
  __pyx_v_it__r = __pyx_v__r.begin();

  /* "geodesic_chenhan.pyx":481
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()
 *         cdef InfoAtVertex item_py_result
 *         while it__r != _r.end():             # <<<<<<<<<<<<<<
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_it__r != __pyx_v__r.end()) != 0);
    if (!__pyx_t_2) break;

    /* "geodesic_chenhan.pyx":482
 *         cdef InfoAtVertex item_py_result
 *         while it__r != _r.end():
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)             # <<<<<<<<<<<<<<
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 *            py_result.append(item_py_result)
 */
    __pyx_t_1 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_InfoAtVertex(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_InfoAtVertex), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_XDECREF_SET(__pyx_v_item_py_result, ((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "geodesic_chenhan.pyx":483
 *         while it__r != _r.end():
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))             # <<<<<<<<<<<<<<
 *            py_result.append(item_py_result)
 *            inc(it__r)
 */
    __pyx_v_item_py_result->inst = boost::shared_ptr<InfoAtVertex> (new InfoAtVertex((*__pyx_v_it__r)));

    /* "geodesic_chenhan.pyx":484
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 *            py_result.append(item_py_result)             # <<<<<<<<<<<<<<
 *            inc(it__r)
 *         return py_result
 */
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_py_result, ((PyObject *)__pyx_v_item_py_result)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 484, __pyx_L1_error)

    /* "geodesic_chenhan.pyx":485
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 *            py_result.append(item_py_result)
 *            inc(it__r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
    (void)((++__pyx_v_it__r));
  }

  /* "geodesic_chenhan.pyx":486
 *            py_result.append(item_py_result)
 *            inc(it__r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 * cdef class CPoint3D:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_py_result);
  __pyx_r = __pyx_v_py_result;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":475
 *         return py_result
 * 
 *     def GetVertexDistances(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.GetVertexDistances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_py_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_item_py_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_28__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_30__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_24CImprovedCHWithEdgeValve_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CImprovedCHWithEdgeValve.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":495
 *     cdef shared_ptr[_CPoint3D] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_8CPoint3D_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_8CPoint3D_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_8CPoint3D___dealloc__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_8CPoint3D___dealloc__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":496
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":495
 *     cdef shared_ptr[_CPoint3D] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":500
 * 
 *     property x:
 *         def __set__(self, double x):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().x = (<double>x)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_8CPoint3D_1x_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_16geodesic_chenhan_8CPoint3D_1x_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 500, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.x.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_1x___set__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self), ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_8CPoint3D_1x___set__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, double __pyx_v_x) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":502
 *         def __set__(self, double x):
 * 
 *             self.inst.get().x = (<double>x)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.get()->x = ((double)__pyx_v_x);

  /* "geodesic_chenhan.pyx":500
 * 
 *     property x:
 *         def __set__(self, double x):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().x = (<double>x)
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":505
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().x
 *             py_result = <double>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_1x_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_1x_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_1x_2__get__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_1x_2__get__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":506
 * 
 *         def __get__(self):
 *             cdef double _r = self.inst.get().x             # <<<<<<<<<<<<<<
 *             py_result = <double>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->x;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":507
 *         def __get__(self):
 *             cdef double _r = self.inst.get().x
 *             py_result = <double>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":508
 *             cdef double _r = self.inst.get().x
 *             py_result = <double>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property y:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":505
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().x
 *             py_result = <double>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":511
 * 
 *     property y:
 *         def __set__(self, double y):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().y = (<double>y)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_8CPoint3D_1y_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_y); /*proto*/
static int __pyx_pw_16geodesic_chenhan_8CPoint3D_1y_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_y) {
  double __pyx_v_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_y); {
    __pyx_v_y = __pyx_PyFloat_AsDouble(__pyx_arg_y); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.y.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_1y___set__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self), ((double)__pyx_v_y));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_8CPoint3D_1y___set__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, double __pyx_v_y) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":513
 *         def __set__(self, double y):
 * 
 *             self.inst.get().y = (<double>y)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.get()->y = ((double)__pyx_v_y);

  /* "geodesic_chenhan.pyx":511
 * 
 *     property y:
 *         def __set__(self, double y):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().y = (<double>y)
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":516
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().y
 *             py_result = <double>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_1y_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_1y_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_1y_2__get__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_1y_2__get__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":517
 * 
 *         def __get__(self):
 *             cdef double _r = self.inst.get().y             # <<<<<<<<<<<<<<
 *             py_result = <double>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->y;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":518
 *         def __get__(self):
 *             cdef double _r = self.inst.get().y
 *             py_result = <double>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":519
 *             cdef double _r = self.inst.get().y
 *             py_result = <double>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property z:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":516
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().y
 *             py_result = <double>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":522
 * 
 *     property z:
 *         def __set__(self, double z):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().z = (<double>z)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_8CPoint3D_1z_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_z); /*proto*/
static int __pyx_pw_16geodesic_chenhan_8CPoint3D_1z_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_z) {
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_z); {
    __pyx_v_z = __pyx_PyFloat_AsDouble(__pyx_arg_z); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 522, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.z.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_1z___set__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self), ((double)__pyx_v_z));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_8CPoint3D_1z___set__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, double __pyx_v_z) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":524
 *         def __set__(self, double z):
 * 
 *             self.inst.get().z = (<double>z)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.get()->z = ((double)__pyx_v_z);

  /* "geodesic_chenhan.pyx":522
 * 
 *     property z:
 *         def __set__(self, double z):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().z = (<double>z)
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":527
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().z
 *             py_result = <double>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_1z_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_1z_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_1z_2__get__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_1z_2__get__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":528
 * 
 *         def __get__(self):
 *             cdef double _r = self.inst.get().z             # <<<<<<<<<<<<<<
 *             py_result = <double>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->z;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":529
 *         def __get__(self):
 *             cdef double _r = self.inst.get().z
 *             py_result = <double>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":530
 *             cdef double _r = self.inst.get().z
 *             py_result = <double>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     def _init_0(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":527
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().z
 *             py_result = <double>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.z.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":532
 *             return py_result
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPoint3D()"""
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D())
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_8CPoint3D_2_init_0[] = "Cython signature: void CPoint3D()";
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0 (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_2_init_0(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_2_init_0(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0", 0);

  /* "geodesic_chenhan.pyx":534
 *     def _init_0(self):
 *         """Cython signature: void CPoint3D()"""
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D())             # <<<<<<<<<<<<<<
 * 
 *     def _init_1(self, CPoint3D other ):
 */
  __pyx_v_self->inst = boost::shared_ptr<CPoint3D> (new CPoint3D());

  /* "geodesic_chenhan.pyx":532
 *             return py_result
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPoint3D()"""
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D())
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":536
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D())
 * 
 *     def _init_1(self, CPoint3D other ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPoint3D(CPoint3D other)"""
 *         assert isinstance(other, CPoint3D), 'arg other wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_16geodesic_chenhan_8CPoint3D_4_init_1[] = "Cython signature: void CPoint3D(CPoint3D other)";
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_1 (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_16geodesic_chenhan_CPoint3D, 1, "other", 0))) __PYX_ERR(1, 536, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_4_init_1(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self), ((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_4_init_1(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_1", 0);

  /* "geodesic_chenhan.pyx":538
 *     def _init_1(self, CPoint3D other ):
 *         """Cython signature: void CPoint3D(CPoint3D other)"""
 *         assert isinstance(other, CPoint3D), 'arg other wrong type'             # <<<<<<<<<<<<<<
 * 
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D((deref(other.inst.get()))))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_other), __pyx_ptype_16geodesic_chenhan_CPoint3D); 
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_other_wrong_type);
      __PYX_ERR(1, 538, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":540
 *         assert isinstance(other, CPoint3D), 'arg other wrong type'
 * 
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D((deref(other.inst.get()))))             # <<<<<<<<<<<<<<
 * 
 *     def _init_2(self, double in_0 , double in_1 , double in_2 ):
 */
  __pyx_v_self->inst = boost::shared_ptr<CPoint3D> (new CPoint3D((*__pyx_v_other->inst.get())));

  /* "geodesic_chenhan.pyx":536
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D())
 * 
 *     def _init_1(self, CPoint3D other ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPoint3D(CPoint3D other)"""
 *         assert isinstance(other, CPoint3D), 'arg other wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D._init_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":542
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D((deref(other.inst.get()))))
 * 
 *     def _init_2(self, double in_0 , double in_1 , double in_2 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPoint3D(double, double, double)"""
 *         assert isinstance(in_0, float), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_7_init_2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_8CPoint3D_6_init_2[] = "Cython signature: void CPoint3D(double, double, double)";
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_7_init_2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_in_0;
  double __pyx_v_in_1;
  double __pyx_v_in_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_0,&__pyx_n_s_in_1,&__pyx_n_s_in_2,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_0)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_2", 1, 3, 3, 1); __PYX_ERR(1, 542, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_2", 1, 3, 3, 2); __PYX_ERR(1, 542, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_2") < 0)) __PYX_ERR(1, 542, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_in_0 = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_in_0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 542, __pyx_L3_error)
    __pyx_v_in_1 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_in_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 542, __pyx_L3_error)
    __pyx_v_in_2 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_in_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 542, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_init_2", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 542, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D._init_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_6_init_2(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1, __pyx_v_in_2);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_6_init_2(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, double __pyx_v_in_0, double __pyx_v_in_1, double __pyx_v_in_2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_2", 0);

  /* "geodesic_chenhan.pyx":544
 *     def _init_2(self, double in_0 , double in_1 , double in_2 ):
 *         """Cython signature: void CPoint3D(double, double, double)"""
 *         assert isinstance(in_0, float), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_1, float), 'arg in_1 wrong type'
 *         assert isinstance(in_2, float), 'arg in_2 wrong type'
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_in_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyFloat_Check(__pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!(__pyx_t_2 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 544, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":545
 *         """Cython signature: void CPoint3D(double, double, double)"""
 *         assert isinstance(in_0, float), 'arg in_0 wrong type'
 *         assert isinstance(in_1, float), 'arg in_1 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_2, float), 'arg in_2 wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_in_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyFloat_Check(__pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!(__pyx_t_2 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_1_wrong_type);
      __PYX_ERR(1, 545, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":546
 *         assert isinstance(in_0, float), 'arg in_0 wrong type'
 *         assert isinstance(in_1, float), 'arg in_1 wrong type'
 *         assert isinstance(in_2, float), 'arg in_2 wrong type'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_in_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyFloat_Check(__pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!(__pyx_t_2 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_2_wrong_type);
      __PYX_ERR(1, 546, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":550
 * 
 * 
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D((<double>in_0), (<double>in_1), (<double>in_2)))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args , **kwargs):
 */
  __pyx_v_self->inst = boost::shared_ptr<CPoint3D> (new CPoint3D(((double)__pyx_v_in_0), ((double)__pyx_v_in_1), ((double)__pyx_v_in_2)));

  /* "geodesic_chenhan.pyx":542
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D((deref(other.inst.get()))))
 * 
 *     def _init_2(self, double in_0 , double in_1 , double in_2 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPoint3D(double, double, double)"""
 *         assert isinstance(in_0, float), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D._init_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":552
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D((<double>in_0), (<double>in_1), (<double>in_2)))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void CPoint3D()
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_8CPoint3D_9__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_8CPoint3D_8__init__[] = "\n          - Cython signature: void CPoint3D()\n          - Cython signature: void CPoint3D(CPoint3D other)\n          - Cython signature: void CPoint3D(double, double, double)\n";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_8CPoint3D_8__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_8CPoint3D_9__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_8__init__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_8CPoint3D_8__init__(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "geodesic_chenhan.pyx":558
 *           - Cython signature: void CPoint3D(double, double, double)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CPoint3D)):
 */
  __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_args) != 0);
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "geodesic_chenhan.pyx":559
 * """
 *         if not args:
 *              self._init_0(*args)             # <<<<<<<<<<<<<<
 *         elif (len(args)==1) and (isinstance(args[0], CPoint3D)):
 *              self._init_1(*args)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 559, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":558
 *           - Cython signature: void CPoint3D(double, double, double)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CPoint3D)):
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":560
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CPoint3D)):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         elif (len(args)==3) and (isinstance(args[0], float)) and (isinstance(args[1], float)) and (isinstance(args[2], float)):
 */
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 560, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_5 == 1) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_t_4, __pyx_ptype_16geodesic_chenhan_CPoint3D); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_1 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "geodesic_chenhan.pyx":561
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CPoint3D)):
 *              self._init_1(*args)             # <<<<<<<<<<<<<<
 *         elif (len(args)==3) and (isinstance(args[0], float)) and (isinstance(args[1], float)) and (isinstance(args[2], float)):
 *              self._init_2(*args)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 561, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "geodesic_chenhan.pyx":560
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], CPoint3D)):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         elif (len(args)==3) and (isinstance(args[0], float)) and (isinstance(args[1], float)) and (isinstance(args[2], float)):
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":562
 *         elif (len(args)==1) and (isinstance(args[0], CPoint3D)):
 *              self._init_1(*args)
 *         elif (len(args)==3) and (isinstance(args[0], float)) and (isinstance(args[1], float)) and (isinstance(args[2], float)):             # <<<<<<<<<<<<<<
 *              self._init_2(*args)
 *         else:
 */
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 562, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 == 3) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyFloat_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = (__pyx_t_6 != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 1);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = PyFloat_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 2);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyFloat_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = (__pyx_t_6 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L6_bool_binop_done:;
  if (likely(__pyx_t_2)) {

    /* "geodesic_chenhan.pyx":563
 *              self._init_1(*args)
 *         elif (len(args)==3) and (isinstance(args[0], float)) and (isinstance(args[1], float)) and (isinstance(args[2], float)):
 *              self._init_2(*args)             # <<<<<<<<<<<<<<
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":562
 *         elif (len(args)==1) and (isinstance(args[0], CPoint3D)):
 *              self._init_1(*args)
 *         elif (len(args)==3) and (isinstance(args[0], float)) and (isinstance(args[1], float)) and (isinstance(args[2], float)):             # <<<<<<<<<<<<<<
 *              self._init_2(*args)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":565
 *              self._init_2(*args)
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))             # <<<<<<<<<<<<<<
 * 
 *     def Normalize(self):
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_args), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_not_handle_type_of, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 565, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "geodesic_chenhan.pyx":552
 *         self.inst = shared_ptr[_CPoint3D](new _CPoint3D((<double>in_0), (<double>in_1), (<double>in_2)))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void CPoint3D()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":567
 *                raise Exception('can not handle type of %s' % (args,))
 * 
 *     def Normalize(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Normalize()"""
 *         self.inst.get().Normalize()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_11Normalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_8CPoint3D_10Normalize[] = "Cython signature: void Normalize()";
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_11Normalize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Normalize (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_10Normalize(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_10Normalize(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Normalize", 0);

  /* "geodesic_chenhan.pyx":569
 *     def Normalize(self):
 *         """Cython signature: void Normalize()"""
 *         self.inst.get().Normalize()             # <<<<<<<<<<<<<<
 * 
 *     def Len(self):
 */
  __pyx_v_self->inst.get()->Normalize();

  /* "geodesic_chenhan.pyx":567
 *                raise Exception('can not handle type of %s' % (args,))
 * 
 *     def Normalize(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Normalize()"""
 *         self.inst.get().Normalize()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":571
 *         self.inst.get().Normalize()
 * 
 *     def Len(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double Len()"""
 *         cdef double _r = self.inst.get().Len()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_13Len(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_8CPoint3D_12Len[] = "Cython signature: double Len()";
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_13Len(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Len (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_12Len(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_12Len(struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Len", 0);

  /* "geodesic_chenhan.pyx":573
 *     def Len(self):
 *         """Cython signature: double Len()"""
 *         cdef double _r = self.inst.get().Len()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->Len();

  /* "geodesic_chenhan.pyx":574
 *         """Cython signature: double Len()"""
 *         cdef double _r = self.inst.get().Len()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":575
 *         cdef double _r = self.inst.get().Len()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 * cdef class CPreviousCH:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":571
 *         self.inst.get().Normalize()
 * 
 *     def Len(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double Len()"""
 *         cdef double _r = self.inst.get().Len()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.Len", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_14__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_8CPoint3D_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_8CPoint3D_16__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_8CPoint3D_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPoint3D.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":585
 *     cdef shared_ptr[_CPreviousCH] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_11CPreviousCH_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_11CPreviousCH_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_11CPreviousCH___dealloc__(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_11CPreviousCH___dealloc__(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":586
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":585
 *     cdef shared_ptr[_CPreviousCH] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":589
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPreviousCH(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_11CPreviousCH_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_2__init__[] = "Cython signature: void CPreviousCH(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_11CPreviousCH_2__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_11CPreviousCH_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_inputModel = 0;
  PyObject *__pyx_v_indexOfSourceVerts = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inputModel,&__pyx_n_s_indexOfSourceVerts,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inputModel)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexOfSourceVerts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 589, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 589, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_inputModel = ((struct __pyx_obj_16geodesic_chenhan_CRichModel *)values[0]);
    __pyx_v_indexOfSourceVerts = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 589, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inputModel), __pyx_ptype_16geodesic_chenhan_CRichModel, 1, "inputModel", 0))) __PYX_ERR(1, 589, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexOfSourceVerts), (&PySet_Type), 1, "indexOfSourceVerts", 1))) __PYX_ERR(1, 589, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_2__init__(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self), __pyx_v_inputModel, __pyx_v_indexOfSourceVerts);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_11CPreviousCH_8__init___2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":592
 *         """Cython signature: void CPreviousCH(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 */

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_8__init___genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_12_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_12_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 592, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_11CPreviousCH_8__init___2generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 592, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_11CPreviousCH_8__init___2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 592, __pyx_L1_error)
  __pyx_t_2 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_indexOfSourceVerts)) { __Pyx_RaiseClosureNameError("indexOfSourceVerts"); __PYX_ERR(1, 592, __pyx_L1_error) }
  __pyx_t_5 = __Pyx_set_iterator(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_indexOfSourceVerts, 1, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_6 = __Pyx_set_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, __pyx_t_4);
    if (unlikely(__pyx_t_6 == 0)) break;
    if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(1, 592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_li);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_li, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_8 = PyInt_Check(__pyx_cur_scope->__pyx_v_li); 
    __pyx_t_9 = (__pyx_t_8 != 0);
    if (!__pyx_t_9) {
    } else {
      __pyx_t_7 = __pyx_t_9;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_9 = PyLong_Check(__pyx_cur_scope->__pyx_v_li); 
    __pyx_t_8 = (__pyx_t_9 != 0);
    __pyx_t_7 = __pyx_t_8;
    __pyx_L7_bool_binop_done:;
    __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0);
    if (__pyx_t_8) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":589
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPreviousCH(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */

static int __pyx_pf_16geodesic_chenhan_11CPreviousCH_2__init__(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_inputModel, PyObject *__pyx_v_indexOfSourceVerts) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *__pyx_cur_scope;
  std::set<int>  __pyx_v_v1;
  PyObject *__pyx_gb_16geodesic_chenhan_11CPreviousCH_8__init___2generator6 = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::set<int>  __pyx_t_6;
  CPreviousCH *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_11___init__(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_11___init__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 589, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_indexOfSourceVerts = __pyx_v_indexOfSourceVerts;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_indexOfSourceVerts);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_indexOfSourceVerts);

  /* "geodesic_chenhan.pyx":591
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):
 *         """Cython signature: void CPreviousCH(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_inputModel), __pyx_ptype_16geodesic_chenhan_CRichModel); 
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_inputModel_wrong_type);
      __PYX_ERR(1, 591, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":592
 *         """Cython signature: void CPreviousCH(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_indexOfSourceVerts;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PySet_Check(__pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_2 = __pyx_pf_16geodesic_chenhan_11CPreviousCH_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 592, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 592, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_indexOfSourceVerts_wrong_typ);
      __PYX_ERR(1, 592, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":594
 *         assert isinstance(indexOfSourceVerts, set) and all(isinstance(li, (int, long)) for li in indexOfSourceVerts), 'arg indexOfSourceVerts wrong type'
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts             # <<<<<<<<<<<<<<
 *         self.inst = shared_ptr[_CPreviousCH](new _CPreviousCH((deref(inputModel.inst.get())), v1))
 * 
 */
  __pyx_t_6 = __pyx_convert_set_from_py_int(__pyx_cur_scope->__pyx_v_indexOfSourceVerts); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 594, __pyx_L1_error)
  __pyx_v_v1 = __pyx_t_6;

  /* "geodesic_chenhan.pyx":595
 * 
 *         cdef libcpp_set[int] v1 = indexOfSourceVerts
 *         self.inst = shared_ptr[_CPreviousCH](new _CPreviousCH((deref(inputModel.inst.get())), v1))             # <<<<<<<<<<<<<<
 * 
 *     def GetRootSourceOfVert(self,  index ):
 */
  try {
    __pyx_t_7 = new CPreviousCH((*__pyx_v_inputModel->inst.get()), __pyx_v_v1);
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 595, __pyx_L1_error)
  }
  __pyx_v_self->inst = boost::shared_ptr<CPreviousCH> (__pyx_t_7);

  /* "geodesic_chenhan.pyx":589
 * 
 * 
 *     def __init__(self, CRichModel inputModel , set indexOfSourceVerts ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CPreviousCH(CRichModel inputModel, libcpp_set[int] indexOfSourceVerts)"""
 *         assert isinstance(inputModel, CRichModel), 'arg inputModel wrong type'
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_11CPreviousCH_8__init___2generator6);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":597
 *         self.inst = shared_ptr[_CPreviousCH](new _CPreviousCH((deref(inputModel.inst.get())), v1))
 * 
 *     def GetRootSourceOfVert(self,  index ):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetRootSourceOfVert(int index)"""
 *         assert isinstance(index, (int, long)), 'arg index wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_5GetRootSourceOfVert(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_4GetRootSourceOfVert[] = "Cython signature: int GetRootSourceOfVert(int index)";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_5GetRootSourceOfVert(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetRootSourceOfVert (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_4GetRootSourceOfVert(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_4GetRootSourceOfVert(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, PyObject *__pyx_v_index) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetRootSourceOfVert", 0);

  /* "geodesic_chenhan.pyx":599
 *     def GetRootSourceOfVert(self,  index ):
 *         """Cython signature: int GetRootSourceOfVert(int index)"""
 *         assert isinstance(index, (int, long)), 'arg index wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_index); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_index); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_index_wrong_type);
      __PYX_ERR(1, 599, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":601
 *         assert isinstance(index, (int, long)), 'arg index wrong type'
 * 
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 601, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->GetRootSourceOfVert(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":602
 * 
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":603
 *         cdef int _r = self.inst.get().GetRootSourceOfVert((<int>index))
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":597
 *         self.inst = shared_ptr[_CPreviousCH](new _CPreviousCH((deref(inputModel.inst.get())), v1))
 * 
 *     def GetRootSourceOfVert(self,  index ):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetRootSourceOfVert(int index)"""
 *         assert isinstance(index, (int, long)), 'arg index wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.GetRootSourceOfVert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":605
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_7FindSourceVertex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_6FindSourceVertex[] = "Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_7FindSourceVertex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_indexOfVert = 0;
  PyObject *__pyx_v_resultingPath = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("FindSourceVertex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_indexOfVert,&__pyx_n_s_resultingPath,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_indexOfVert)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resultingPath)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("FindSourceVertex", 1, 2, 2, 1); __PYX_ERR(1, 605, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "FindSourceVertex") < 0)) __PYX_ERR(1, 605, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_indexOfVert = values[0];
    __pyx_v_resultingPath = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("FindSourceVertex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 605, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.FindSourceVertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_resultingPath), (&PyList_Type), 1, "resultingPath", 1))) __PYX_ERR(1, 605, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_6FindSourceVertex(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self), __pyx_v_indexOfVert, __pyx_v_resultingPath);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_11CPreviousCH_16FindSourceVertex_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":608
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 */

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_16FindSourceVertex_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_14_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_14_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 608, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_11CPreviousCH_16FindSourceVertex_2generator7, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_FindSourceVertex_locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.FindSourceVertex.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_11CPreviousCH_16FindSourceVertex_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 608, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_resultingPath)) { __Pyx_RaiseClosureNameError("resultingPath"); __PYX_ERR(1, 608, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_resultingPath == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 608, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_resultingPath; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 608, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elemt_rec);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_ptype_16geodesic_chenhan_EdgePoint); 
    __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
    if (__pyx_t_5) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":605
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_6FindSourceVertex(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, PyObject *__pyx_v_indexOfVert, PyObject *__pyx_v_resultingPath) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *__pyx_cur_scope;
  std::vector<EdgePoint>  *__pyx_v_v1;
  struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_item1 = 0;
  std::vector<EdgePoint>  __pyx_v__r;
  PyObject *__pyx_v_py_result = NULL;
  std::vector<EdgePoint> ::iterator __pyx_v_it__r;
  struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_item_py_result = 0;
  PyObject *__pyx_gb_16geodesic_chenhan_11CPreviousCH_16FindSourceVertex_2generator7 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  std::vector<EdgePoint>  *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FindSourceVertex", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 605, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_resultingPath = __pyx_v_resultingPath;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_resultingPath);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_resultingPath);

  /* "geodesic_chenhan.pyx":607
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_indexOfVert); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_indexOfVert); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_indexOfVert_wrong_type);
      __PYX_ERR(1, 607, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":608
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_4 = __pyx_cur_scope->__pyx_v_resultingPath;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_2 = PyList_Check(__pyx_t_4); 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_4 = __pyx_pf_16geodesic_chenhan_11CPreviousCH_16FindSourceVertex_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_L5_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_resultingPath_wrong_type);
      __PYX_ERR(1, 608, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":610
 *         assert isinstance(resultingPath, list) and all(isinstance(elemt_rec, EdgePoint) for elemt_rec in resultingPath), 'arg resultingPath wrong type'
 * 
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()             # <<<<<<<<<<<<<<
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:
 */
  try {
    __pyx_t_6 = new std::vector<EdgePoint> ();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 610, __pyx_L1_error)
  }
  __pyx_v_v1 = __pyx_t_6;

  /* "geodesic_chenhan.pyx":612
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 */
  if (unlikely(__pyx_cur_scope->__pyx_v_resultingPath == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 612, __pyx_L1_error)
  }
  __pyx_t_5 = __pyx_cur_scope->__pyx_v_resultingPath; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 612, __pyx_L1_error)
    #else
    __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_16geodesic_chenhan_EdgePoint))))) __PYX_ERR(1, 612, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_item1, ((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":613
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:
 *             v1.push_back(deref(item1.inst.get()))             # <<<<<<<<<<<<<<
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 *         del v1
 */
    try {
      __pyx_v_v1->push_back((*__pyx_v_item1->inst.get()));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 613, __pyx_L1_error)
    }

    /* "geodesic_chenhan.pyx":612
 *         cdef libcpp_vector[_EdgePoint] * v1 = new libcpp_vector[_EdgePoint]()
 *         cdef EdgePoint item1
 *         for item1 in resultingPath:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "geodesic_chenhan.pyx":614
 *         for item1 in resultingPath:
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))             # <<<<<<<<<<<<<<
 *         del v1
 *         py_result = []
 */
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_indexOfVert); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 614, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->FindSourceVertex(((int)__pyx_t_8), (*__pyx_v_v1));

  /* "geodesic_chenhan.pyx":615
 *             v1.push_back(deref(item1.inst.get()))
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 *         del v1             # <<<<<<<<<<<<<<
 *         py_result = []
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()
 */
  delete __pyx_v_v1;

  /* "geodesic_chenhan.pyx":616
 *         _r = self.inst.get().FindSourceVertex((<int>indexOfVert), deref(v1))
 *         del v1
 *         py_result = []             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()
 *         cdef EdgePoint item_py_result
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_py_result = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "geodesic_chenhan.pyx":617
 *         del v1
 *         py_result = []
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()             # <<<<<<<<<<<<<<
 *         cdef EdgePoint item_py_result
 *         while it__r != _r.end():
 */
  __pyx_v_it__r = __pyx_v__r.begin();

  /* "geodesic_chenhan.pyx":619
 *         cdef libcpp_vector[_EdgePoint].iterator it__r = _r.begin()
 *         cdef EdgePoint item_py_result
 *         while it__r != _r.end():             # <<<<<<<<<<<<<<
 *            item_py_result = EdgePoint.__new__(EdgePoint)
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_it__r != __pyx_v__r.end()) != 0);
    if (!__pyx_t_1) break;

    /* "geodesic_chenhan.pyx":620
 *         cdef EdgePoint item_py_result
 *         while it__r != _r.end():
 *            item_py_result = EdgePoint.__new__(EdgePoint)             # <<<<<<<<<<<<<<
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 *            py_result.append(item_py_result)
 */
    __pyx_t_5 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_EdgePoint(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_EdgePoint), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 620, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    __Pyx_XDECREF_SET(__pyx_v_item_py_result, ((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "geodesic_chenhan.pyx":621
 *         while it__r != _r.end():
 *            item_py_result = EdgePoint.__new__(EdgePoint)
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))             # <<<<<<<<<<<<<<
 *            py_result.append(item_py_result)
 *            inc(it__r)
 */
    __pyx_v_item_py_result->inst = boost::shared_ptr<EdgePoint> (new EdgePoint((*__pyx_v_it__r)));

    /* "geodesic_chenhan.pyx":622
 *            item_py_result = EdgePoint.__new__(EdgePoint)
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 *            py_result.append(item_py_result)             # <<<<<<<<<<<<<<
 *            inc(it__r)
 *         return py_result
 */
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_py_result, ((PyObject *)__pyx_v_item_py_result)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 622, __pyx_L1_error)

    /* "geodesic_chenhan.pyx":623
 *            item_py_result.inst = shared_ptr[_EdgePoint](new _EdgePoint(deref(it__r)))
 *            py_result.append(item_py_result)
 *            inc(it__r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
    (void)((++__pyx_v_it__r));
  }

  /* "geodesic_chenhan.pyx":624
 *            py_result.append(item_py_result)
 *            inc(it__r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def PickShortestPaths(self,  num ):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_py_result);
  __pyx_r = __pyx_v_py_result;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":605
 *         return py_result
 * 
 *     def FindSourceVertex(self,  indexOfVert , list resultingPath ):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[EdgePoint] FindSourceVertex(int indexOfVert, libcpp_vector[EdgePoint] resultingPath)"""
 *         assert isinstance(indexOfVert, (int, long)), 'arg indexOfVert wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.FindSourceVertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_item1);
  __Pyx_XDECREF(__pyx_v_py_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_item_py_result);
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_11CPreviousCH_16FindSourceVertex_2generator7);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":626
 *         return py_result
 * 
 *     def PickShortestPaths(self,  num ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void PickShortestPaths(int num)"""
 *         assert isinstance(num, (int, long)), 'arg num wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_9PickShortestPaths(PyObject *__pyx_v_self, PyObject *__pyx_v_num); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_8PickShortestPaths[] = "Cython signature: void PickShortestPaths(int num)";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_9PickShortestPaths(PyObject *__pyx_v_self, PyObject *__pyx_v_num) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("PickShortestPaths (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_8PickShortestPaths(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self), ((PyObject *)__pyx_v_num));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_8PickShortestPaths(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, PyObject *__pyx_v_num) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PickShortestPaths", 0);

  /* "geodesic_chenhan.pyx":628
 *     def PickShortestPaths(self,  num ):
 *         """Cython signature: void PickShortestPaths(int num)"""
 *         assert isinstance(num, (int, long)), 'arg num wrong type'             # <<<<<<<<<<<<<<
 * 
 *         self.inst.get().PickShortestPaths((<int>num))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_num); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_num); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_num_wrong_type);
      __PYX_ERR(1, 628, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":630
 *         assert isinstance(num, (int, long)), 'arg num wrong type'
 * 
 *         self.inst.get().PickShortestPaths((<int>num))             # <<<<<<<<<<<<<<
 * 
 *     def Execute(self):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_num); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 630, __pyx_L1_error)
  __pyx_v_self->inst.get()->PickShortestPaths(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":626
 *         return py_result
 * 
 *     def PickShortestPaths(self,  num ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void PickShortestPaths(int num)"""
 *         assert isinstance(num, (int, long)), 'arg num wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.PickShortestPaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":632
 *         self.inst.get().PickShortestPaths((<int>num))
 * 
 *     def Execute(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Execute()"""
 *         self.inst.get().Execute()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_11Execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_10Execute[] = "Cython signature: void Execute()";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_11Execute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Execute (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_10Execute(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_10Execute(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Execute", 0);

  /* "geodesic_chenhan.pyx":634
 *     def Execute(self):
 *         """Cython signature: void Execute()"""
 *         self.inst.get().Execute()             # <<<<<<<<<<<<<<
 * 
 *     def GetRunTime(self):
 */
  __pyx_v_self->inst.get()->Execute();

  /* "geodesic_chenhan.pyx":632
 *         self.inst.get().PickShortestPaths((<int>num))
 * 
 *     def Execute(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Execute()"""
 *         self.inst.get().Execute()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":636
 *         self.inst.get().Execute()
 * 
 *     def GetRunTime(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_13GetRunTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_12GetRunTime[] = "Cython signature: double GetRunTime()";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_13GetRunTime(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetRunTime (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_12GetRunTime(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_12GetRunTime(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetRunTime", 0);

  /* "geodesic_chenhan.pyx":638
 *     def GetRunTime(self):
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetRunTime();

  /* "geodesic_chenhan.pyx":639
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":640
 *         cdef double _r = self.inst.get().GetRunTime()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetMemoryCost(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":636
 *         self.inst.get().Execute()
 * 
 *     def GetRunTime(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetRunTime()"""
 *         cdef double _r = self.inst.get().GetRunTime()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.GetRunTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":642
 *         return py_result
 * 
 *     def GetMemoryCost(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_15GetMemoryCost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_14GetMemoryCost[] = "Cython signature: double GetMemoryCost()";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_15GetMemoryCost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetMemoryCost (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_14GetMemoryCost(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_14GetMemoryCost(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetMemoryCost", 0);

  /* "geodesic_chenhan.pyx":644
 *     def GetMemoryCost(self):
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetMemoryCost();

  /* "geodesic_chenhan.pyx":645
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":646
 *         cdef double _r = self.inst.get().GetMemoryCost()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetWindowNum(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":642
 *         return py_result
 * 
 *     def GetMemoryCost(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetMemoryCost()"""
 *         cdef double _r = self.inst.get().GetMemoryCost()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.GetMemoryCost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":648
 *         return py_result
 * 
 *     def GetWindowNum(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_17GetWindowNum(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_16GetWindowNum[] = "Cython signature: int GetWindowNum()";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_17GetWindowNum(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetWindowNum (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_16GetWindowNum(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_16GetWindowNum(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetWindowNum", 0);

  /* "geodesic_chenhan.pyx":650
 *     def GetWindowNum(self):
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetWindowNum();

  /* "geodesic_chenhan.pyx":651
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":652
 *         cdef int _r = self.inst.get().GetWindowNum()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetMaxLenOfQue(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":648
 *         return py_result
 * 
 *     def GetWindowNum(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetWindowNum()"""
 *         cdef int _r = self.inst.get().GetWindowNum()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.GetWindowNum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":654
 *         return py_result
 * 
 *     def GetMaxLenOfQue(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_19GetMaxLenOfQue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_18GetMaxLenOfQue[] = "Cython signature: int GetMaxLenOfQue()";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_19GetMaxLenOfQue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetMaxLenOfQue (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_18GetMaxLenOfQue(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_18GetMaxLenOfQue(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetMaxLenOfQue", 0);

  /* "geodesic_chenhan.pyx":656
 *     def GetMaxLenOfQue(self):
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetMaxLenOfQue();

  /* "geodesic_chenhan.pyx":657
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":658
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNPE(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":654
 *         return py_result
 * 
 *     def GetMaxLenOfQue(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetMaxLenOfQue()"""
 *         cdef int _r = self.inst.get().GetMaxLenOfQue()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.GetMaxLenOfQue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":660
 *         return py_result
 * 
 *     def GetNPE(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_21GetNPE(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_20GetNPE[] = "Cython signature: double GetNPE()";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_21GetNPE(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNPE (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_20GetNPE(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_20GetNPE(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNPE", 0);

  /* "geodesic_chenhan.pyx":662
 *     def GetNPE(self):
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()             # <<<<<<<<<<<<<<
 *         py_result = <double>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNPE();

  /* "geodesic_chenhan.pyx":663
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()
 *         py_result = <double>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":664
 *         cdef double _r = self.inst.get().GetNPE()
 *         py_result = <double>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetDepthOfSequenceTree(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":660
 *         return py_result
 * 
 *     def GetNPE(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: double GetNPE()"""
 *         cdef double _r = self.inst.get().GetNPE()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.GetNPE", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":666
 *         return py_result
 * 
 *     def GetDepthOfSequenceTree(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_23GetDepthOfSequenceTree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_22GetDepthOfSequenceTree[] = "Cython signature: int GetDepthOfSequenceTree()";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_23GetDepthOfSequenceTree(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetDepthOfSequenceTree (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_22GetDepthOfSequenceTree(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_22GetDepthOfSequenceTree(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetDepthOfSequenceTree", 0);

  /* "geodesic_chenhan.pyx":668
 *     def GetDepthOfSequenceTree(self):
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetDepthOfSequenceTree();

  /* "geodesic_chenhan.pyx":669
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":670
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def HasBeenCompleted(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":666
 *         return py_result
 * 
 *     def GetDepthOfSequenceTree(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetDepthOfSequenceTree()"""
 *         cdef int _r = self.inst.get().GetDepthOfSequenceTree()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.GetDepthOfSequenceTree", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":672
 *         return py_result
 * 
 *     def HasBeenCompleted(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_25HasBeenCompleted(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_24HasBeenCompleted[] = "Cython signature: bool HasBeenCompleted()";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_25HasBeenCompleted(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasBeenCompleted (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_24HasBeenCompleted(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_24HasBeenCompleted(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("HasBeenCompleted", 0);

  /* "geodesic_chenhan.pyx":674
 *     def HasBeenCompleted(self):
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->HasBeenCompleted();

  /* "geodesic_chenhan.pyx":675
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":676
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetVertexDistances(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":672
 *         return py_result
 * 
 *     def HasBeenCompleted(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool HasBeenCompleted()"""
 *         cdef bool _r = self.inst.get().HasBeenCompleted()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.HasBeenCompleted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":678
 *         return py_result
 * 
 *     def GetVertexDistances(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_27GetVertexDistances(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_11CPreviousCH_26GetVertexDistances[] = "Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()";
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_27GetVertexDistances(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetVertexDistances (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_26GetVertexDistances(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_26GetVertexDistances(struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  std::vector<InfoAtVertex>  __pyx_v__r;
  PyObject *__pyx_v_py_result = NULL;
  std::vector<InfoAtVertex> ::iterator __pyx_v_it__r;
  struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_item_py_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetVertexDistances", 0);

  /* "geodesic_chenhan.pyx":680
 *     def GetVertexDistances(self):
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()             # <<<<<<<<<<<<<<
 *         py_result = []
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetVertexDistances();

  /* "geodesic_chenhan.pyx":681
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()
 *         py_result = []             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()
 *         cdef InfoAtVertex item_py_result
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_py_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "geodesic_chenhan.pyx":682
 *         _r = self.inst.get().GetVertexDistances()
 *         py_result = []
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()             # <<<<<<<<<<<<<<
 *         cdef InfoAtVertex item_py_result
 *         while it__r != _r.end():
 */
  __pyx_v_it__r = __pyx_v__r.begin();

  /* "geodesic_chenhan.pyx":684
 *         cdef libcpp_vector[_InfoAtVertex].iterator it__r = _r.begin()
 *         cdef InfoAtVertex item_py_result
 *         while it__r != _r.end():             # <<<<<<<<<<<<<<
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_it__r != __pyx_v__r.end()) != 0);
    if (!__pyx_t_2) break;

    /* "geodesic_chenhan.pyx":685
 *         cdef InfoAtVertex item_py_result
 *         while it__r != _r.end():
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)             # <<<<<<<<<<<<<<
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 *            py_result.append(item_py_result)
 */
    __pyx_t_1 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_InfoAtVertex(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_InfoAtVertex), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 685, __pyx_L1_error)
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_XDECREF_SET(__pyx_v_item_py_result, ((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "geodesic_chenhan.pyx":686
 *         while it__r != _r.end():
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))             # <<<<<<<<<<<<<<
 *            py_result.append(item_py_result)
 *            inc(it__r)
 */
    __pyx_v_item_py_result->inst = boost::shared_ptr<InfoAtVertex> (new InfoAtVertex((*__pyx_v_it__r)));

    /* "geodesic_chenhan.pyx":687
 *            item_py_result = InfoAtVertex.__new__(InfoAtVertex)
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 *            py_result.append(item_py_result)             # <<<<<<<<<<<<<<
 *            inc(it__r)
 *         return py_result
 */
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_py_result, ((PyObject *)__pyx_v_item_py_result)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 687, __pyx_L1_error)

    /* "geodesic_chenhan.pyx":688
 *            item_py_result.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex(deref(it__r)))
 *            py_result.append(item_py_result)
 *            inc(it__r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
    (void)((++__pyx_v_it__r));
  }

  /* "geodesic_chenhan.pyx":689
 *            py_result.append(item_py_result)
 *            inc(it__r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 * cdef class CRichModel:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_py_result);
  __pyx_r = __pyx_v_py_result;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":678
 *         return py_result
 * 
 *     def GetVertexDistances(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: libcpp_vector[InfoAtVertex] GetVertexDistances()"""
 *         _r = self.inst.get().GetVertexDistances()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.GetVertexDistances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_py_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_item_py_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_28__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_11CPreviousCH_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_11CPreviousCH_30__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_11CPreviousCH_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CPreviousCH *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CPreviousCH.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":699
 *     cdef shared_ptr[_CRichModel] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_10CRichModel_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_10CRichModel_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_10CRichModel___dealloc__(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_10CRichModel___dealloc__(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":700
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":699
 *     cdef shared_ptr[_CRichModel] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":703
 * 
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CRichModel()"""
 *         self.inst = shared_ptr[_CRichModel](new _CRichModel())
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_10CRichModel_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_2__init__[] = "Cython signature: void CRichModel()";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_10CRichModel_2__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_10CRichModel_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_2__init__(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_10CRichModel_2__init__(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "geodesic_chenhan.pyx":705
 *     def __init__(self):
 *         """Cython signature: void CRichModel()"""
 *         self.inst = shared_ptr[_CRichModel](new _CRichModel())             # <<<<<<<<<<<<<<
 * 
 *     def Preprocess(self):
 */
  __pyx_v_self->inst = boost::shared_ptr<CRichModel> (new CRichModel());

  /* "geodesic_chenhan.pyx":703
 * 
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void CRichModel()"""
 *         self.inst = shared_ptr[_CRichModel](new _CRichModel())
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":707
 *         self.inst = shared_ptr[_CRichModel](new _CRichModel())
 * 
 *     def Preprocess(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Preprocess()"""
 *         self.inst.get().Preprocess()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_5Preprocess(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_4Preprocess[] = "Cython signature: void Preprocess()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_5Preprocess(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Preprocess (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_4Preprocess(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_4Preprocess(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Preprocess", 0);

  /* "geodesic_chenhan.pyx":709
 *     def Preprocess(self):
 *         """Cython signature: void Preprocess()"""
 *         self.inst.get().Preprocess()             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfEdges(self):
 */
  __pyx_v_self->inst.get()->Preprocess();

  /* "geodesic_chenhan.pyx":707
 *         self.inst = shared_ptr[_CRichModel](new _CRichModel())
 * 
 *     def Preprocess(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void Preprocess()"""
 *         self.inst.get().Preprocess()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":711
 *         self.inst.get().Preprocess()
 * 
 *     def GetNumOfEdges(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfEdges()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_7GetNumOfEdges(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_6GetNumOfEdges[] = "Cython signature: int GetNumOfEdges()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_7GetNumOfEdges(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfEdges (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_6GetNumOfEdges(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_6GetNumOfEdges(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfEdges", 0);

  /* "geodesic_chenhan.pyx":713
 *     def GetNumOfEdges(self):
 *         """Cython signature: int GetNumOfEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfEdges()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfEdges();

  /* "geodesic_chenhan.pyx":714
 *         """Cython signature: int GetNumOfEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfEdges()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":715
 *         cdef int _r = self.inst.get().GetNumOfEdges()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfValidDirectedEdges(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":711
 *         self.inst.get().Preprocess()
 * 
 *     def GetNumOfEdges(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfEdges()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.GetNumOfEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":717
 *         return py_result
 * 
 *     def GetNumOfValidDirectedEdges(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfValidDirectedEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfValidDirectedEdges()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_9GetNumOfValidDirectedEdges(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_8GetNumOfValidDirectedEdges[] = "Cython signature: int GetNumOfValidDirectedEdges()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_9GetNumOfValidDirectedEdges(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfValidDirectedEdges (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_8GetNumOfValidDirectedEdges(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_8GetNumOfValidDirectedEdges(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfValidDirectedEdges", 0);

  /* "geodesic_chenhan.pyx":719
 *     def GetNumOfValidDirectedEdges(self):
 *         """Cython signature: int GetNumOfValidDirectedEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfValidDirectedEdges()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfValidDirectedEdges();

  /* "geodesic_chenhan.pyx":720
 *         """Cython signature: int GetNumOfValidDirectedEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfValidDirectedEdges()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":721
 *         cdef int _r = self.inst.get().GetNumOfValidDirectedEdges()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfTotalUndirectedEdges(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":717
 *         return py_result
 * 
 *     def GetNumOfValidDirectedEdges(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfValidDirectedEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfValidDirectedEdges()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.GetNumOfValidDirectedEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":723
 *         return py_result
 * 
 *     def GetNumOfTotalUndirectedEdges(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfTotalUndirectedEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfTotalUndirectedEdges()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_11GetNumOfTotalUndirectedEdges(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_10GetNumOfTotalUndirectedEdges[] = "Cython signature: int GetNumOfTotalUndirectedEdges()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_11GetNumOfTotalUndirectedEdges(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfTotalUndirectedEdges (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_10GetNumOfTotalUndirectedEdges(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_10GetNumOfTotalUndirectedEdges(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfTotalUndirectedEdges", 0);

  /* "geodesic_chenhan.pyx":725
 *     def GetNumOfTotalUndirectedEdges(self):
 *         """Cython signature: int GetNumOfTotalUndirectedEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfTotalUndirectedEdges()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfTotalUndirectedEdges();

  /* "geodesic_chenhan.pyx":726
 *         """Cython signature: int GetNumOfTotalUndirectedEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfTotalUndirectedEdges()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":727
 *         cdef int _r = self.inst.get().GetNumOfTotalUndirectedEdges()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfGenera(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":723
 *         return py_result
 * 
 *     def GetNumOfTotalUndirectedEdges(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfTotalUndirectedEdges()"""
 *         cdef int _r = self.inst.get().GetNumOfTotalUndirectedEdges()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.GetNumOfTotalUndirectedEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":729
 *         return py_result
 * 
 *     def GetNumOfGenera(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfGenera()"""
 *         cdef int _r = self.inst.get().GetNumOfGenera()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_13GetNumOfGenera(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_12GetNumOfGenera[] = "Cython signature: int GetNumOfGenera()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_13GetNumOfGenera(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfGenera (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_12GetNumOfGenera(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_12GetNumOfGenera(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfGenera", 0);

  /* "geodesic_chenhan.pyx":731
 *     def GetNumOfGenera(self):
 *         """Cython signature: int GetNumOfGenera()"""
 *         cdef int _r = self.inst.get().GetNumOfGenera()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfGenera();

  /* "geodesic_chenhan.pyx":732
 *         """Cython signature: int GetNumOfGenera()"""
 *         cdef int _r = self.inst.get().GetNumOfGenera()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":733
 *         cdef int _r = self.inst.get().GetNumOfGenera()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfIsolated(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":729
 *         return py_result
 * 
 *     def GetNumOfGenera(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfGenera()"""
 *         cdef int _r = self.inst.get().GetNumOfGenera()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.GetNumOfGenera", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":735
 *         return py_result
 * 
 *     def GetNumOfIsolated(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfIsolated()"""
 *         cdef int _r = self.inst.get().GetNumOfIsolated()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_15GetNumOfIsolated(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_14GetNumOfIsolated[] = "Cython signature: int GetNumOfIsolated()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_15GetNumOfIsolated(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfIsolated (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_14GetNumOfIsolated(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_14GetNumOfIsolated(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfIsolated", 0);

  /* "geodesic_chenhan.pyx":737
 *     def GetNumOfIsolated(self):
 *         """Cython signature: int GetNumOfIsolated()"""
 *         cdef int _r = self.inst.get().GetNumOfIsolated()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfIsolated();

  /* "geodesic_chenhan.pyx":738
 *         """Cython signature: int GetNumOfIsolated()"""
 *         cdef int _r = self.inst.get().GetNumOfIsolated()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":739
 *         cdef int _r = self.inst.get().GetNumOfIsolated()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfComponents(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":735
 *         return py_result
 * 
 *     def GetNumOfIsolated(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfIsolated()"""
 *         cdef int _r = self.inst.get().GetNumOfIsolated()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.GetNumOfIsolated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":741
 *         return py_result
 * 
 *     def GetNumOfComponents(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfComponents()"""
 *         cdef int _r = self.inst.get().GetNumOfComponents()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_17GetNumOfComponents(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_16GetNumOfComponents[] = "Cython signature: int GetNumOfComponents()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_17GetNumOfComponents(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfComponents (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_16GetNumOfComponents(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_16GetNumOfComponents(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfComponents", 0);

  /* "geodesic_chenhan.pyx":743
 *     def GetNumOfComponents(self):
 *         """Cython signature: int GetNumOfComponents()"""
 *         cdef int _r = self.inst.get().GetNumOfComponents()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfComponents();

  /* "geodesic_chenhan.pyx":744
 *         """Cython signature: int GetNumOfComponents()"""
 *         cdef int _r = self.inst.get().GetNumOfComponents()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":745
 *         cdef int _r = self.inst.get().GetNumOfComponents()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfBoundries(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":741
 *         return py_result
 * 
 *     def GetNumOfComponents(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfComponents()"""
 *         cdef int _r = self.inst.get().GetNumOfComponents()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.GetNumOfComponents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":747
 *         return py_result
 * 
 *     def GetNumOfBoundries(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfBoundries()"""
 *         cdef int _r = self.inst.get().GetNumOfBoundries()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_19GetNumOfBoundries(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_18GetNumOfBoundries[] = "Cython signature: int GetNumOfBoundries()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_19GetNumOfBoundries(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfBoundries (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_18GetNumOfBoundries(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_18GetNumOfBoundries(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfBoundries", 0);

  /* "geodesic_chenhan.pyx":749
 *     def GetNumOfBoundries(self):
 *         """Cython signature: int GetNumOfBoundries()"""
 *         cdef int _r = self.inst.get().GetNumOfBoundries()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfBoundries();

  /* "geodesic_chenhan.pyx":750
 *         """Cython signature: int GetNumOfBoundries()"""
 *         cdef int _r = self.inst.get().GetNumOfBoundries()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":751
 *         cdef int _r = self.inst.get().GetNumOfBoundries()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def IsConvexVert(self,  in_0 ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":747
 *         return py_result
 * 
 *     def GetNumOfBoundries(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfBoundries()"""
 *         cdef int _r = self.inst.get().GetNumOfBoundries()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.GetNumOfBoundries", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":753
 *         return py_result
 * 
 *     def IsConvexVert(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool IsConvexVert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_21IsConvexVert(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_20IsConvexVert[] = "Cython signature: bool IsConvexVert(int)";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_21IsConvexVert(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsConvexVert (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_20IsConvexVert(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self), ((PyObject *)__pyx_v_in_0));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_20IsConvexVert(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("IsConvexVert", 0);

  /* "geodesic_chenhan.pyx":755
 *     def IsConvexVert(self,  in_0 ):
 *         """Cython signature: bool IsConvexVert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef bool _r = self.inst.get().IsConvexVert((<int>in_0))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 755, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":757
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 * 
 *         cdef bool _r = self.inst.get().IsConvexVert((<int>in_0))             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 757, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->IsConvexVert(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":758
 * 
 *         cdef bool _r = self.inst.get().IsConvexVert((<int>in_0))
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":759
 *         cdef bool _r = self.inst.get().IsConvexVert((<int>in_0))
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def isBoundaryVert(self,  in_0 ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":753
 *         return py_result
 * 
 *     def IsConvexVert(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool IsConvexVert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.IsConvexVert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":761
 *         return py_result
 * 
 *     def isBoundaryVert(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool isBoundaryVert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_23isBoundaryVert(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_22isBoundaryVert[] = "Cython signature: bool isBoundaryVert(int)";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_23isBoundaryVert(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isBoundaryVert (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_22isBoundaryVert(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self), ((PyObject *)__pyx_v_in_0));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_22isBoundaryVert(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isBoundaryVert", 0);

  /* "geodesic_chenhan.pyx":763
 *     def isBoundaryVert(self,  in_0 ):
 *         """Cython signature: bool isBoundaryVert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef bool _r = self.inst.get().isBoundaryVert((<int>in_0))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 763, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":765
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 * 
 *         cdef bool _r = self.inst.get().isBoundaryVert((<int>in_0))             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 765, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->isBoundaryVert(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":766
 * 
 *         cdef bool _r = self.inst.get().isBoundaryVert((<int>in_0))
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":767
 *         cdef bool _r = self.inst.get().isBoundaryVert((<int>in_0))
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def IsClosedModel(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":761
 *         return py_result
 * 
 *     def isBoundaryVert(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool isBoundaryVert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.isBoundaryVert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":769
 *         return py_result
 * 
 *     def IsClosedModel(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool IsClosedModel()"""
 *         cdef bool _r = self.inst.get().IsClosedModel()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_25IsClosedModel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_24IsClosedModel[] = "Cython signature: bool IsClosedModel()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_25IsClosedModel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsClosedModel (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_24IsClosedModel(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_24IsClosedModel(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("IsClosedModel", 0);

  /* "geodesic_chenhan.pyx":771
 *     def IsClosedModel(self):
 *         """Cython signature: bool IsClosedModel()"""
 *         cdef bool _r = self.inst.get().IsClosedModel()             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->IsClosedModel();

  /* "geodesic_chenhan.pyx":772
 *         """Cython signature: bool IsClosedModel()"""
 *         cdef bool _r = self.inst.get().IsClosedModel()
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":773
 *         cdef bool _r = self.inst.get().IsClosedModel()
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def IsExtremeEdge(self,  in_0 ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":769
 *         return py_result
 * 
 *     def IsClosedModel(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool IsClosedModel()"""
 *         cdef bool _r = self.inst.get().IsClosedModel()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.IsClosedModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":775
 *         return py_result
 * 
 *     def IsExtremeEdge(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool IsExtremeEdge(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_27IsExtremeEdge(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_26IsExtremeEdge[] = "Cython signature: bool IsExtremeEdge(int)";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_27IsExtremeEdge(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsExtremeEdge (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_26IsExtremeEdge(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self), ((PyObject *)__pyx_v_in_0));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_26IsExtremeEdge(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("IsExtremeEdge", 0);

  /* "geodesic_chenhan.pyx":777
 *     def IsExtremeEdge(self,  in_0 ):
 *         """Cython signature: bool IsExtremeEdge(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef bool _r = self.inst.get().IsExtremeEdge((<int>in_0))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 777, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":779
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 * 
 *         cdef bool _r = self.inst.get().IsExtremeEdge((<int>in_0))             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 779, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->IsExtremeEdge(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":780
 * 
 *         cdef bool _r = self.inst.get().IsExtremeEdge((<int>in_0))
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":781
 *         cdef bool _r = self.inst.get().IsExtremeEdge((<int>in_0))
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def IsStartEdge(self,  in_0 ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":775
 *         return py_result
 * 
 *     def IsExtremeEdge(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool IsExtremeEdge(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.IsExtremeEdge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":783
 *         return py_result
 * 
 *     def IsStartEdge(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool IsStartEdge(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_29IsStartEdge(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_28IsStartEdge[] = "Cython signature: bool IsStartEdge(int)";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_29IsStartEdge(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsStartEdge (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_28IsStartEdge(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self), ((PyObject *)__pyx_v_in_0));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_28IsStartEdge(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("IsStartEdge", 0);

  /* "geodesic_chenhan.pyx":785
 *     def IsStartEdge(self,  in_0 ):
 *         """Cython signature: bool IsStartEdge(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef bool _r = self.inst.get().IsStartEdge((<int>in_0))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 785, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":787
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 * 
 *         cdef bool _r = self.inst.get().IsStartEdge((<int>in_0))             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 787, __pyx_L1_error)
  __pyx_v__r = __pyx_v_self->inst.get()->IsStartEdge(((int)__pyx_t_4));

  /* "geodesic_chenhan.pyx":788
 * 
 *         cdef bool _r = self.inst.get().IsStartEdge((<int>in_0))
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":789
 *         cdef bool _r = self.inst.get().IsStartEdge((<int>in_0))
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def HasBeenProcessed(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":783
 *         return py_result
 * 
 *     def IsStartEdge(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool IsStartEdge(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.IsStartEdge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":791
 *         return py_result
 * 
 *     def HasBeenProcessed(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool HasBeenProcessed()"""
 *         cdef bool _r = self.inst.get().HasBeenProcessed()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_31HasBeenProcessed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_30HasBeenProcessed[] = "Cython signature: bool HasBeenProcessed()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_31HasBeenProcessed(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasBeenProcessed (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_30HasBeenProcessed(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_30HasBeenProcessed(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("HasBeenProcessed", 0);

  /* "geodesic_chenhan.pyx":793
 *     def HasBeenProcessed(self):
 *         """Cython signature: bool HasBeenProcessed()"""
 *         cdef bool _r = self.inst.get().HasBeenProcessed()             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->HasBeenProcessed();

  /* "geodesic_chenhan.pyx":794
 *         """Cython signature: bool HasBeenProcessed()"""
 *         cdef bool _r = self.inst.get().HasBeenProcessed()
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":795
 *         cdef bool _r = self.inst.get().HasBeenProcessed()
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def Edge(self,  in_0 ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":791
 *         return py_result
 * 
 *     def HasBeenProcessed(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool HasBeenProcessed()"""
 *         cdef bool _r = self.inst.get().HasBeenProcessed()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.HasBeenProcessed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":797
 *         return py_result
 * 
 *     def Edge(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: CEdge Edge(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_33Edge(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_32Edge[] = "Cython signature: CEdge Edge(int)";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_33Edge(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Edge (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_32Edge(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self), ((PyObject *)__pyx_v_in_0));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_32Edge(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0) {
  CEdge *__pyx_v__r;
  struct __pyx_obj_16geodesic_chenhan_CEdge *__pyx_v_py_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Edge", 0);

  /* "geodesic_chenhan.pyx":799
 *     def Edge(self,  in_0 ):
 *         """Cython signature: CEdge Edge(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef _CEdge * _r = new _CEdge(self.inst.get().Edge((<int>in_0)))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 799, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":801
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 * 
 *         cdef _CEdge * _r = new _CEdge(self.inst.get().Edge((<int>in_0)))             # <<<<<<<<<<<<<<
 *         cdef CEdge py_result = CEdge.__new__(CEdge)
 *         py_result.inst = shared_ptr[_CEdge](_r)
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 801, __pyx_L1_error)
  __pyx_v__r = new CEdge(__pyx_v_self->inst.get()->Edge(((int)__pyx_t_4)));

  /* "geodesic_chenhan.pyx":802
 * 
 *         cdef _CEdge * _r = new _CEdge(self.inst.get().Edge((<int>in_0)))
 *         cdef CEdge py_result = CEdge.__new__(CEdge)             # <<<<<<<<<<<<<<
 *         py_result.inst = shared_ptr[_CEdge](_r)
 *         return py_result
 */
  __pyx_t_5 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_CEdge(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_CEdge), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 802, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __pyx_v_py_result = ((struct __pyx_obj_16geodesic_chenhan_CEdge *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "geodesic_chenhan.pyx":803
 *         cdef _CEdge * _r = new _CEdge(self.inst.get().Edge((<int>in_0)))
 *         cdef CEdge py_result = CEdge.__new__(CEdge)
 *         py_result.inst = shared_ptr[_CEdge](_r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result->inst = boost::shared_ptr<CEdge> (__pyx_v__r);

  /* "geodesic_chenhan.pyx":804
 *         cdef CEdge py_result = CEdge.__new__(CEdge)
 *         py_result.inst = shared_ptr[_CEdge](_r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def LoadModel(self, list vertices , list faces ):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_py_result));
  __pyx_r = ((PyObject *)__pyx_v_py_result);
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":797
 *         return py_result
 * 
 *     def Edge(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: CEdge Edge(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.Edge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_py_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":806
 *         return py_result
 * 
 *     def LoadModel(self, list vertices , list faces ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_35LoadModel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_34LoadModel[] = "Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_35LoadModel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertices = 0;
  PyObject *__pyx_v_faces = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("LoadModel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertices,&__pyx_n_s_faces,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertices)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_faces)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("LoadModel", 1, 2, 2, 1); __PYX_ERR(1, 806, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "LoadModel") < 0)) __PYX_ERR(1, 806, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vertices = ((PyObject*)values[0]);
    __pyx_v_faces = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("LoadModel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 806, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.LoadModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertices), (&PyList_Type), 1, "vertices", 1))) __PYX_ERR(1, 806, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_faces), (&PyList_Type), 1, "faces", 1))) __PYX_ERR(1, 806, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_34LoadModel(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self), __pyx_v_vertices, __pyx_v_faces);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":808
 *     def LoadModel(self, list vertices , list faces ):
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 */

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_9LoadModel_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_16_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_16_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 808, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_2generator8, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_LoadModel_locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 808, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.LoadModel.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 808, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_vertices)) { __Pyx_RaiseClosureNameError("vertices"); __PYX_ERR(1, 808, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 808, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_vertices; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 808, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elemt_rec);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_ptype_16geodesic_chenhan_CPoint3D); 
    __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
    if (__pyx_t_5) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_5generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "geodesic_chenhan.pyx":809
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 */

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_9LoadModel_3genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_17_genexpr(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_17_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 809, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_5generator9, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_LoadModel_locals_genexpr, __pyx_n_s_geodesic_chenhan); if (unlikely(!gen)) __PYX_ERR(1, 809, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.LoadModel.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_5generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *__pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("genexpr", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(1, 809, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_faces)) { __Pyx_RaiseClosureNameError("faces"); __PYX_ERR(1, 809, __pyx_L1_error) }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_faces == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 809, __pyx_L1_error)
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_faces; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 809, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_elemt_rec);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_TypeCheck(__pyx_cur_scope->__pyx_v_elemt_rec, __pyx_ptype_16geodesic_chenhan_CFace); 
    __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
    if (__pyx_t_5) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
  }
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  #if !CYTHON_USE_EXC_INFO_STACK
  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  #endif
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":806
 *         return py_result
 * 
 *     def LoadModel(self, list vertices , list faces ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 */

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_34LoadModel(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_vertices, PyObject *__pyx_v_faces) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *__pyx_cur_scope;
  std::vector<CPoint3D>  *__pyx_v_v0;
  struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_item0 = 0;
  std::vector<CFace>  *__pyx_v_v1;
  struct __pyx_obj_16geodesic_chenhan_CFace *__pyx_v_item1 = 0;
  PyObject *__pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_2generator8 = 0;
  PyObject *__pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_5generator9 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  std::vector<CPoint3D>  *__pyx_t_6;
  Py_ssize_t __pyx_t_7;
  std::vector<CFace>  *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("LoadModel", 0);
  __pyx_cur_scope = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *)__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_15_LoadModel(__pyx_ptype_16geodesic_chenhan___pyx_scope_struct_15_LoadModel, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(1, 806, __pyx_L1_error)
  } else {
    __Pyx_GOTREF(__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_vertices = __pyx_v_vertices;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_vertices);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_vertices);
  __pyx_cur_scope->__pyx_v_faces = __pyx_v_faces;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_faces);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_faces);

  /* "geodesic_chenhan.pyx":808
 *     def LoadModel(self, list vertices , list faces ):
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = __pyx_cur_scope->__pyx_v_vertices;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyList_Check(__pyx_t_2); 
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_1 = __pyx_t_4;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_2 = __pyx_pf_16geodesic_chenhan_10CRichModel_9LoadModel_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_Generator_Next(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 808, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 808, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __pyx_t_4;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_vertices_wrong_type);
      __PYX_ERR(1, 808, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":809
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_5 = __pyx_cur_scope->__pyx_v_faces;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_4 = PyList_Check(__pyx_t_5); 
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = (__pyx_t_4 != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_5 = __pyx_pf_16geodesic_chenhan_10CRichModel_9LoadModel_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 809, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 809, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __pyx_t_3;
    __pyx_L5_bool_binop_done:;
    if (unlikely(!__pyx_t_1)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_faces_wrong_type);
      __PYX_ERR(1, 809, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":810
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 *         assert isinstance(faces, list) and all(isinstance(elemt_rec, CFace) for elemt_rec in faces), 'arg faces wrong type'
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()             # <<<<<<<<<<<<<<
 *         cdef CPoint3D item0
 *         for item0 in vertices:
 */
  try {
    __pyx_t_6 = new std::vector<CPoint3D> ();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 810, __pyx_L1_error)
  }
  __pyx_v_v0 = __pyx_t_6;

  /* "geodesic_chenhan.pyx":812
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 *         for item0 in vertices:             # <<<<<<<<<<<<<<
 *             v0.push_back(deref(item0.inst.get()))
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 */
  if (unlikely(__pyx_cur_scope->__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 812, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_vertices; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 812, __pyx_L1_error)
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_16geodesic_chenhan_CPoint3D))))) __PYX_ERR(1, 812, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_item0, ((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "geodesic_chenhan.pyx":813
 *         cdef CPoint3D item0
 *         for item0 in vertices:
 *             v0.push_back(deref(item0.inst.get()))             # <<<<<<<<<<<<<<
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 *         cdef CFace item1
 */
    try {
      __pyx_v_v0->push_back((*__pyx_v_item0->inst.get()));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 813, __pyx_L1_error)
    }

    /* "geodesic_chenhan.pyx":812
 *         cdef libcpp_vector[_CPoint3D] * v0 = new libcpp_vector[_CPoint3D]()
 *         cdef CPoint3D item0
 *         for item0 in vertices:             # <<<<<<<<<<<<<<
 *             v0.push_back(deref(item0.inst.get()))
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "geodesic_chenhan.pyx":814
 *         for item0 in vertices:
 *             v0.push_back(deref(item0.inst.get()))
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()             # <<<<<<<<<<<<<<
 *         cdef CFace item1
 *         for item1 in faces:
 */
  try {
    __pyx_t_8 = new std::vector<CFace> ();
  } catch(...) {
    __Pyx_CppExn2PyErr();
    __PYX_ERR(1, 814, __pyx_L1_error)
  }
  __pyx_v_v1 = __pyx_t_8;

  /* "geodesic_chenhan.pyx":816
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 *         cdef CFace item1
 *         for item1 in faces:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 */
  if (unlikely(__pyx_cur_scope->__pyx_v_faces == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(1, 816, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_faces; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
  for (;;) {
    if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 816, __pyx_L1_error)
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_16geodesic_chenhan_CFace))))) __PYX_ERR(1, 816, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_item1, ((struct __pyx_obj_16geodesic_chenhan_CFace *)__pyx_t_5));
    __pyx_t_5 = 0;

    /* "geodesic_chenhan.pyx":817
 *         cdef CFace item1
 *         for item1 in faces:
 *             v1.push_back(deref(item1.inst.get()))             # <<<<<<<<<<<<<<
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 *         del v1
 */
    try {
      __pyx_v_v1->push_back((*__pyx_v_item1->inst.get()));
    } catch(...) {
      __Pyx_CppExn2PyErr();
      __PYX_ERR(1, 817, __pyx_L1_error)
    }

    /* "geodesic_chenhan.pyx":816
 *         cdef libcpp_vector[_CFace] * v1 = new libcpp_vector[_CFace]()
 *         cdef CFace item1
 *         for item1 in faces:             # <<<<<<<<<<<<<<
 *             v1.push_back(deref(item1.inst.get()))
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "geodesic_chenhan.pyx":818
 *         for item1 in faces:
 *             v1.push_back(deref(item1.inst.get()))
 *         self.inst.get().LoadModel(deref(v0), deref(v1))             # <<<<<<<<<<<<<<
 *         del v1
 *         del v0
 */
  __pyx_v_self->inst.get()->LoadModel((*__pyx_v_v0), (*__pyx_v_v1));

  /* "geodesic_chenhan.pyx":819
 *             v1.push_back(deref(item1.inst.get()))
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 *         del v1             # <<<<<<<<<<<<<<
 *         del v0
 * 
 */
  delete __pyx_v_v1;

  /* "geodesic_chenhan.pyx":820
 *         self.inst.get().LoadModel(deref(v0), deref(v1))
 *         del v1
 *         del v0             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfVerts(self):
 */
  delete __pyx_v_v0;

  /* "geodesic_chenhan.pyx":806
 *         return py_result
 * 
 *     def LoadModel(self, list vertices , list faces ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void LoadModel(libcpp_vector[CPoint3D] vertices, libcpp_vector[CFace] faces)"""
 *         assert isinstance(vertices, list) and all(isinstance(elemt_rec, CPoint3D) for elemt_rec in vertices), 'arg vertices wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.LoadModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_item0);
  __Pyx_XDECREF((PyObject *)__pyx_v_item1);
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_2generator8);
  __Pyx_XDECREF(__pyx_gb_16geodesic_chenhan_10CRichModel_9LoadModel_5generator9);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":822
 *         del v0
 * 
 *     def GetNumOfVerts(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfVerts()"""
 *         cdef int _r = self.inst.get().GetNumOfVerts()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_37GetNumOfVerts(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_36GetNumOfVerts[] = "Cython signature: int GetNumOfVerts()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_37GetNumOfVerts(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfVerts (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_36GetNumOfVerts(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_36GetNumOfVerts(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfVerts", 0);

  /* "geodesic_chenhan.pyx":824
 *     def GetNumOfVerts(self):
 *         """Cython signature: int GetNumOfVerts()"""
 *         cdef int _r = self.inst.get().GetNumOfVerts()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfVerts();

  /* "geodesic_chenhan.pyx":825
 *         """Cython signature: int GetNumOfVerts()"""
 *         cdef int _r = self.inst.get().GetNumOfVerts()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":826
 *         cdef int _r = self.inst.get().GetNumOfVerts()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def GetNumOfFaces(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":822
 *         del v0
 * 
 *     def GetNumOfVerts(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfVerts()"""
 *         cdef int _r = self.inst.get().GetNumOfVerts()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.GetNumOfVerts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":828
 *         return py_result
 * 
 *     def GetNumOfFaces(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfFaces()"""
 *         cdef int _r = self.inst.get().GetNumOfFaces()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_39GetNumOfFaces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_38GetNumOfFaces[] = "Cython signature: int GetNumOfFaces()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_39GetNumOfFaces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("GetNumOfFaces (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_38GetNumOfFaces(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_38GetNumOfFaces(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("GetNumOfFaces", 0);

  /* "geodesic_chenhan.pyx":830
 *     def GetNumOfFaces(self):
 *         """Cython signature: int GetNumOfFaces()"""
 *         cdef int _r = self.inst.get().GetNumOfFaces()             # <<<<<<<<<<<<<<
 *         py_result = <int>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->GetNumOfFaces();

  /* "geodesic_chenhan.pyx":831
 *         """Cython signature: int GetNumOfFaces()"""
 *         cdef int _r = self.inst.get().GetNumOfFaces()
 *         py_result = <int>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":832
 *         cdef int _r = self.inst.get().GetNumOfFaces()
 *         py_result = <int>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def isAValidModel(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":828
 *         return py_result
 * 
 *     def GetNumOfFaces(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: int GetNumOfFaces()"""
 *         cdef int _r = self.inst.get().GetNumOfFaces()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.GetNumOfFaces", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":834
 *         return py_result
 * 
 *     def isAValidModel(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool isAValidModel()"""
 *         cdef bool _r = self.inst.get().isAValidModel()
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_41isAValidModel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_40isAValidModel[] = "Cython signature: bool isAValidModel()";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_41isAValidModel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isAValidModel (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_40isAValidModel(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_40isAValidModel(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isAValidModel", 0);

  /* "geodesic_chenhan.pyx":836
 *     def isAValidModel(self):
 *         """Cython signature: bool isAValidModel()"""
 *         cdef bool _r = self.inst.get().isAValidModel()             # <<<<<<<<<<<<<<
 *         py_result = <bool>_r
 *         return py_result
 */
  __pyx_v__r = __pyx_v_self->inst.get()->isAValidModel();

  /* "geodesic_chenhan.pyx":837
 *         """Cython signature: bool isAValidModel()"""
 *         cdef bool _r = self.inst.get().isAValidModel()
 *         py_result = <bool>_r             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":838
 *         cdef bool _r = self.inst.get().isAValidModel()
 *         py_result = <bool>_r
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 *     def Vert(self,  in_0 ):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":834
 *         return py_result
 * 
 *     def isAValidModel(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: bool isAValidModel()"""
 *         cdef bool _r = self.inst.get().isAValidModel()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.isAValidModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":840
 *         return py_result
 * 
 *     def Vert(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: CPoint3D Vert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_43Vert(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0); /*proto*/
static char __pyx_doc_16geodesic_chenhan_10CRichModel_42Vert[] = "Cython signature: CPoint3D Vert(int)";
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_43Vert(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Vert (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_42Vert(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self), ((PyObject *)__pyx_v_in_0));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_42Vert(struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, PyObject *__pyx_v_in_0) {
  CPoint3D *__pyx_v__r;
  struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_py_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Vert", 0);

  /* "geodesic_chenhan.pyx":842
 *     def Vert(self,  in_0 ):
 *         """Cython signature: CPoint3D Vert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Vert((<int>in_0)))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 842, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":844
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 * 
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Vert((<int>in_0)))             # <<<<<<<<<<<<<<
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)
 *         py_result.inst = shared_ptr[_CPoint3D](_r)
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 844, __pyx_L1_error)
  __pyx_v__r = new CPoint3D(__pyx_v_self->inst.get()->Vert(((int)__pyx_t_4)));

  /* "geodesic_chenhan.pyx":845
 * 
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Vert((<int>in_0)))
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)             # <<<<<<<<<<<<<<
 *         py_result.inst = shared_ptr[_CPoint3D](_r)
 *         return py_result
 */
  __pyx_t_5 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_CPoint3D(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_CPoint3D), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 845, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __pyx_v_py_result = ((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "geodesic_chenhan.pyx":846
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Vert((<int>in_0)))
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)
 *         py_result.inst = shared_ptr[_CPoint3D](_r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result->inst = boost::shared_ptr<CPoint3D> (__pyx_v__r);

  /* "geodesic_chenhan.pyx":847
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)
 *         py_result.inst = shared_ptr[_CPoint3D](_r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 * cdef class EdgePoint:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_py_result));
  __pyx_r = ((PyObject *)__pyx_v_py_result);
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":840
 *         return py_result
 * 
 *     def Vert(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: CPoint3D Vert(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.Vert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_py_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_44__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_10CRichModel_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_10CRichModel_46__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_10CRichModel_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.CRichModel.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":856
 *     cdef shared_ptr[_EdgePoint] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_9EdgePoint_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_9EdgePoint_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_9EdgePoint___dealloc__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_9EdgePoint___dealloc__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":857
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":856
 *     cdef shared_ptr[_EdgePoint] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":861
 * 
 *     property index:
 *         def __set__(self,  index):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().index = (<int>index)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_5index_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_5index_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_5index___set__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_9EdgePoint_5index___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_index) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":863
 *         def __set__(self,  index):
 * 
 *             self.inst.get().index = (<int>index)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 863, __pyx_L1_error)
  __pyx_v_self->inst.get()->index = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":861
 * 
 *     property index:
 *         def __set__(self,  index):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().index = (<int>index)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.index.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":866
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().index
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_5index_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_5index_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_5index_2__get__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_5index_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":867
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().index             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->index;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":868
 *         def __get__(self):
 *             cdef int _r = self.inst.get().index
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":869
 *             cdef int _r = self.inst.get().index
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property leftVertIndex:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":866
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().index
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":872
 * 
 *     property leftVertIndex:
 *         def __set__(self,  leftVertIndex):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().leftVertIndex = (<int>leftVertIndex)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_13leftVertIndex_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_leftVertIndex); /*proto*/
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_13leftVertIndex_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_leftVertIndex) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_13leftVertIndex___set__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), ((PyObject *)__pyx_v_leftVertIndex));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_9EdgePoint_13leftVertIndex___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_leftVertIndex) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":874
 *         def __set__(self,  leftVertIndex):
 * 
 *             self.inst.get().leftVertIndex = (<int>leftVertIndex)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_leftVertIndex); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 874, __pyx_L1_error)
  __pyx_v_self->inst.get()->leftVertIndex = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":872
 * 
 *     property leftVertIndex:
 *         def __set__(self,  leftVertIndex):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().leftVertIndex = (<int>leftVertIndex)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.leftVertIndex.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":877
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().leftVertIndex
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_13leftVertIndex_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_13leftVertIndex_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_13leftVertIndex_2__get__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_13leftVertIndex_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":878
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().leftVertIndex             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->leftVertIndex;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":879
 *         def __get__(self):
 *             cdef int _r = self.inst.get().leftVertIndex
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":880
 *             cdef int _r = self.inst.get().leftVertIndex
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property rightVertIndex:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":877
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().leftVertIndex
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.leftVertIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":883
 * 
 *     property rightVertIndex:
 *         def __set__(self,  rightVertIndex):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().rightVertIndex = (<int>rightVertIndex)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_14rightVertIndex_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_rightVertIndex); /*proto*/
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_14rightVertIndex_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_rightVertIndex) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_14rightVertIndex___set__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), ((PyObject *)__pyx_v_rightVertIndex));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_9EdgePoint_14rightVertIndex___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_rightVertIndex) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":885
 *         def __set__(self,  rightVertIndex):
 * 
 *             self.inst.get().rightVertIndex = (<int>rightVertIndex)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_rightVertIndex); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 885, __pyx_L1_error)
  __pyx_v_self->inst.get()->rightVertIndex = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":883
 * 
 *     property rightVertIndex:
 *         def __set__(self,  rightVertIndex):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().rightVertIndex = (<int>rightVertIndex)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.rightVertIndex.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":888
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().rightVertIndex
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_14rightVertIndex_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_14rightVertIndex_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_14rightVertIndex_2__get__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_14rightVertIndex_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":889
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().rightVertIndex             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->rightVertIndex;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":890
 *         def __get__(self):
 *             cdef int _r = self.inst.get().rightVertIndex
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":891
 *             cdef int _r = self.inst.get().rightVertIndex
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property proportion:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":888
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().rightVertIndex
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.rightVertIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":894
 * 
 *     property proportion:
 *         def __set__(self, double proportion):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().proportion = (<double>proportion)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_10proportion_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_proportion); /*proto*/
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_10proportion_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_proportion) {
  double __pyx_v_proportion;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_proportion); {
    __pyx_v_proportion = __pyx_PyFloat_AsDouble(__pyx_arg_proportion); if (unlikely((__pyx_v_proportion == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 894, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.proportion.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_10proportion___set__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), ((double)__pyx_v_proportion));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_9EdgePoint_10proportion___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, double __pyx_v_proportion) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":896
 *         def __set__(self, double proportion):
 * 
 *             self.inst.get().proportion = (<double>proportion)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.get()->proportion = ((double)__pyx_v_proportion);

  /* "geodesic_chenhan.pyx":894
 * 
 *     property proportion:
 *         def __set__(self, double proportion):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().proportion = (<double>proportion)
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":899
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().proportion
 *             py_result = <double>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_10proportion_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_10proportion_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_10proportion_2__get__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_10proportion_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":900
 * 
 *         def __get__(self):
 *             cdef double _r = self.inst.get().proportion             # <<<<<<<<<<<<<<
 *             py_result = <double>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->proportion;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":901
 *         def __get__(self):
 *             cdef double _r = self.inst.get().proportion
 *             py_result = <double>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":902
 *             cdef double _r = self.inst.get().proportion
 *             py_result = <double>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property isVertex:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":899
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().proportion
 *             py_result = <double>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.proportion.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":905
 * 
 *     property isVertex:
 *         def __set__(self,  isVertex):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().isVertex = (<bool>isVertex)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_8isVertex_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isVertex); /*proto*/
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_8isVertex_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_isVertex) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_8isVertex___set__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), ((PyObject *)__pyx_v_isVertex));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_9EdgePoint_8isVertex___set__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_isVertex) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  bool __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":907
 *         def __set__(self,  isVertex):
 * 
 *             self.inst.get().isVertex = (<bool>isVertex)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_isVertex); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 907, __pyx_L1_error)
  __pyx_v_self->inst.get()->isVertex = ((bool)__pyx_t_1);

  /* "geodesic_chenhan.pyx":905
 * 
 *     property isVertex:
 *         def __set__(self,  isVertex):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().isVertex = (<bool>isVertex)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.isVertex.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":910
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef bool _r = self.inst.get().isVertex
 *             py_result = <bool>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_8isVertex_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_8isVertex_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_8isVertex_2__get__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_8isVertex_2__get__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  bool __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":911
 * 
 *         def __get__(self):
 *             cdef bool _r = self.inst.get().isVertex             # <<<<<<<<<<<<<<
 *             py_result = <bool>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->isVertex;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":912
 *         def __get__(self):
 *             cdef bool _r = self.inst.get().isVertex
 *             py_result = <bool>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":913
 *             cdef bool _r = self.inst.get().isVertex
 *             py_result = <bool>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     def _init_0(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 913, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":910
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef bool _r = self.inst.get().isVertex
 *             py_result = <bool>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.isVertex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":915
 *             return py_result
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint()"""
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint())
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_9EdgePoint_2_init_0[] = "Cython signature: void EdgePoint()";
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0 (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_2_init_0(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_2_init_0(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0", 0);

  /* "geodesic_chenhan.pyx":917
 *     def _init_0(self):
 *         """Cython signature: void EdgePoint()"""
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint())             # <<<<<<<<<<<<<<
 * 
 *     def _init_1(self, EdgePoint other ):
 */
  __pyx_v_self->inst = boost::shared_ptr<EdgePoint> (new EdgePoint());

  /* "geodesic_chenhan.pyx":915
 *             return py_result
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint()"""
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint())
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":919
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint())
 * 
 *     def _init_1(self, EdgePoint other ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint(EdgePoint other)"""
 *         assert isinstance(other, EdgePoint), 'arg other wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_16geodesic_chenhan_9EdgePoint_4_init_1[] = "Cython signature: void EdgePoint(EdgePoint other)";
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_1 (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_16geodesic_chenhan_EdgePoint, 1, "other", 0))) __PYX_ERR(1, 919, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_4_init_1(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), ((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_4_init_1(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_1", 0);

  /* "geodesic_chenhan.pyx":921
 *     def _init_1(self, EdgePoint other ):
 *         """Cython signature: void EdgePoint(EdgePoint other)"""
 *         assert isinstance(other, EdgePoint), 'arg other wrong type'             # <<<<<<<<<<<<<<
 * 
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((deref(other.inst.get()))))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_other), __pyx_ptype_16geodesic_chenhan_EdgePoint); 
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_other_wrong_type);
      __PYX_ERR(1, 921, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":923
 *         assert isinstance(other, EdgePoint), 'arg other wrong type'
 * 
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((deref(other.inst.get()))))             # <<<<<<<<<<<<<<
 * 
 *     def _init_2(self,  in_0 ):
 */
  __pyx_v_self->inst = boost::shared_ptr<EdgePoint> (new EdgePoint((*__pyx_v_other->inst.get())));

  /* "geodesic_chenhan.pyx":919
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint())
 * 
 *     def _init_1(self, EdgePoint other ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint(EdgePoint other)"""
 *         assert isinstance(other, EdgePoint), 'arg other wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint._init_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":925
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((deref(other.inst.get()))))
 * 
 *     def _init_2(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_7_init_2(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0); /*proto*/
static char __pyx_doc_16geodesic_chenhan_9EdgePoint_6_init_2[] = "Cython signature: void EdgePoint(int)";
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_7_init_2(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_2 (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_6_init_2(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), ((PyObject *)__pyx_v_in_0));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_6_init_2(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_in_0) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_2", 0);

  /* "geodesic_chenhan.pyx":927
 *     def _init_2(self,  in_0 ):
 *         """Cython signature: void EdgePoint(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 * 
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((<int>in_0)))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 927, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":929
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 * 
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((<int>in_0)))             # <<<<<<<<<<<<<<
 * 
 *     def _init_3(self,  in_0 , double in_1 ):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 929, __pyx_L1_error)
  __pyx_v_self->inst = boost::shared_ptr<EdgePoint> (new EdgePoint(((int)__pyx_t_4)));

  /* "geodesic_chenhan.pyx":925
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((deref(other.inst.get()))))
 * 
 *     def _init_2(self,  in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint(int)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint._init_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":931
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((<int>in_0)))
 * 
 *     def _init_3(self,  in_0 , double in_1 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint(int, double)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_9_init_3(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_9EdgePoint_8_init_3[] = "Cython signature: void EdgePoint(int, double)";
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_9_init_3(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_0 = 0;
  double __pyx_v_in_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_3 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_0,&__pyx_n_s_in_1,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_0)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_3", 1, 2, 2, 1); __PYX_ERR(1, 931, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_3") < 0)) __PYX_ERR(1, 931, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_in_0 = values[0];
    __pyx_v_in_1 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_in_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 931, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_init_3", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 931, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint._init_3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_8_init_3(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_8_init_3(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_in_0, double __pyx_v_in_1) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_3", 0);

  /* "geodesic_chenhan.pyx":933
 *     def _init_3(self,  in_0 , double in_1 ):
 *         """Cython signature: void EdgePoint(int, double)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_1, float), 'arg in_1 wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_0); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_0); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 933, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":934
 *         """Cython signature: void EdgePoint(int, double)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 *         assert isinstance(in_1, float), 'arg in_1 wrong type'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_in_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 934, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyFloat_Check(__pyx_t_4); 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_1_wrong_type);
      __PYX_ERR(1, 934, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":937
 * 
 * 
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((<int>in_0), (<double>in_1)))             # <<<<<<<<<<<<<<
 * 
 *     def _init_4(self, CRichModel in_0 ,  in_1 ,  in_2 , double in_3 ):
 */
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_0); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 937, __pyx_L1_error)
  __pyx_v_self->inst = boost::shared_ptr<EdgePoint> (new EdgePoint(((int)__pyx_t_5), ((double)__pyx_v_in_1)));

  /* "geodesic_chenhan.pyx":931
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((<int>in_0)))
 * 
 *     def _init_3(self,  in_0 , double in_1 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint(int, double)"""
 *         assert isinstance(in_0, (int, long)), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint._init_3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":939
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((<int>in_0), (<double>in_1)))
 * 
 *     def _init_4(self, CRichModel in_0 ,  in_1 ,  in_2 , double in_3 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint(CRichModel, int, int, double)"""
 *         assert isinstance(in_0, CRichModel), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_11_init_4(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_9EdgePoint_10_init_4[] = "Cython signature: void EdgePoint(CRichModel, int, int, double)";
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_11_init_4(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_in_0 = 0;
  PyObject *__pyx_v_in_1 = 0;
  PyObject *__pyx_v_in_2 = 0;
  double __pyx_v_in_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_4 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_in_0,&__pyx_n_s_in_1,&__pyx_n_s_in_2,&__pyx_n_s_in_3,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_0)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_4", 1, 4, 4, 1); __PYX_ERR(1, 939, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_4", 1, 4, 4, 2); __PYX_ERR(1, 939, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_in_3)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_init_4", 1, 4, 4, 3); __PYX_ERR(1, 939, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_init_4") < 0)) __PYX_ERR(1, 939, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_in_0 = ((struct __pyx_obj_16geodesic_chenhan_CRichModel *)values[0]);
    __pyx_v_in_1 = values[1];
    __pyx_v_in_2 = values[2];
    __pyx_v_in_3 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_in_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 939, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_init_4", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 939, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint._init_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_16geodesic_chenhan_CRichModel, 1, "in_0", 0))) __PYX_ERR(1, 939, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_10_init_4(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), __pyx_v_in_0, __pyx_v_in_1, __pyx_v_in_2, __pyx_v_in_3);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_10_init_4(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_in_0, PyObject *__pyx_v_in_1, PyObject *__pyx_v_in_2, double __pyx_v_in_3) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_4", 0);

  /* "geodesic_chenhan.pyx":941
 *     def _init_4(self, CRichModel in_0 ,  in_1 ,  in_2 , double in_3 ):
 *         """Cython signature: void EdgePoint(CRichModel, int, int, double)"""
 *         assert isinstance(in_0, CRichModel), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_in_0), __pyx_ptype_16geodesic_chenhan_CRichModel); 
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 941, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":942
 *         """Cython signature: void EdgePoint(CRichModel, int, int, double)"""
 *         assert isinstance(in_0, CRichModel), 'arg in_0 wrong type'
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'
 *         assert isinstance(in_3, float), 'arg in_3 wrong type'
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_1); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L3_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_1); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L3_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_1_wrong_type);
      __PYX_ERR(1, 942, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":943
 *         assert isinstance(in_0, CRichModel), 'arg in_0 wrong type'
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'             # <<<<<<<<<<<<<<
 *         assert isinstance(in_3, float), 'arg in_3 wrong type'
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_2 = PyInt_Check(__pyx_v_in_2); 
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (!__pyx_t_3) {
    } else {
      __pyx_t_1 = __pyx_t_3;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_3 = PyLong_Check(__pyx_v_in_2); 
    __pyx_t_2 = (__pyx_t_3 != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_2_wrong_type);
      __PYX_ERR(1, 943, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":944
 *         assert isinstance(in_1, (int, long)), 'arg in_1 wrong type'
 *         assert isinstance(in_2, (int, long)), 'arg in_2 wrong type'
 *         assert isinstance(in_3, float), 'arg in_3 wrong type'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_4 = PyFloat_FromDouble(__pyx_v_in_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyFloat_Check(__pyx_t_4); 
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_3_wrong_type);
      __PYX_ERR(1, 944, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":949
 * 
 * 
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((deref(in_0.inst.get())), (<int>in_1), (<int>in_2), (<double>in_3)))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args , **kwargs):
 */
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_in_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 949, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_in_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 949, __pyx_L1_error)
  __pyx_v_self->inst = boost::shared_ptr<EdgePoint> (new EdgePoint((*__pyx_v_in_0->inst.get()), ((int)__pyx_t_5), ((int)__pyx_t_6), ((double)__pyx_v_in_3)));

  /* "geodesic_chenhan.pyx":939
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((<int>in_0), (<double>in_1)))
 * 
 *     def _init_4(self, CRichModel in_0 ,  in_1 ,  in_2 , double in_3 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void EdgePoint(CRichModel, int, int, double)"""
 *         assert isinstance(in_0, CRichModel), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint._init_4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":951
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((deref(in_0.inst.get())), (<int>in_1), (<int>in_2), (<double>in_3)))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void EdgePoint()
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_13__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_9EdgePoint_12__init__[] = "\n          - Cython signature: void EdgePoint()\n          - Cython signature: void EdgePoint(EdgePoint other)\n          - Cython signature: void EdgePoint(int)\n          - Cython signature: void EdgePoint(int, double)\n          - Cython signature: void EdgePoint(CRichModel, int, int, double)\n";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_9EdgePoint_12__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_9EdgePoint_13__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_12__init__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_9EdgePoint_12__init__(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "geodesic_chenhan.pyx":959
 *           - Cython signature: void EdgePoint(CRichModel, int, int, double)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], EdgePoint)):
 */
  __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_args) != 0);
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "geodesic_chenhan.pyx":960
 * """
 *         if not args:
 *              self._init_0(*args)             # <<<<<<<<<<<<<<
 *         elif (len(args)==1) and (isinstance(args[0], EdgePoint)):
 *              self._init_1(*args)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":959
 *           - Cython signature: void EdgePoint(CRichModel, int, int, double)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], EdgePoint)):
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":961
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], EdgePoint)):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         elif (len(args)==1) and (isinstance(args[0], (int, long))):
 */
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 961, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_5 == 1) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_t_4, __pyx_ptype_16geodesic_chenhan_EdgePoint); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_1 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "geodesic_chenhan.pyx":962
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], EdgePoint)):
 *              self._init_1(*args)             # <<<<<<<<<<<<<<
 *         elif (len(args)==1) and (isinstance(args[0], (int, long))):
 *              self._init_2(*args)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "geodesic_chenhan.pyx":961
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], EdgePoint)):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         elif (len(args)==1) and (isinstance(args[0], (int, long))):
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":963
 *         elif (len(args)==1) and (isinstance(args[0], EdgePoint)):
 *              self._init_1(*args)
 *         elif (len(args)==1) and (isinstance(args[0], (int, long))):             # <<<<<<<<<<<<<<
 *              self._init_2(*args)
 *         elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], float)):
 */
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 963, __pyx_L1_error)
  __pyx_t_6 = ((__pyx_t_5 == 1) != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = PyInt_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L8_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_7 = PyLong_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = (__pyx_t_7 != 0);
  __pyx_t_6 = __pyx_t_1;
  __pyx_L8_bool_binop_done:;
  __pyx_t_1 = (__pyx_t_6 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_2) {

    /* "geodesic_chenhan.pyx":964
 *              self._init_1(*args)
 *         elif (len(args)==1) and (isinstance(args[0], (int, long))):
 *              self._init_2(*args)             # <<<<<<<<<<<<<<
 *         elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], float)):
 *              self._init_3(*args)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":963
 *         elif (len(args)==1) and (isinstance(args[0], EdgePoint)):
 *              self._init_1(*args)
 *         elif (len(args)==1) and (isinstance(args[0], (int, long))):             # <<<<<<<<<<<<<<
 *              self._init_2(*args)
 *         elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], float)):
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":965
 *         elif (len(args)==1) and (isinstance(args[0], (int, long))):
 *              self._init_2(*args)
 *         elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], float)):             # <<<<<<<<<<<<<<
 *              self._init_3(*args)
 *         elif (len(args)==4) and (isinstance(args[0], CRichModel)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))) and (isinstance(args[3], float)):
 */
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 965, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_5 == 2) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = PyInt_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L13_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_7 = PyLong_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L13_bool_binop_done:;
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 1);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_6 = PyFloat_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_6 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_2) {

    /* "geodesic_chenhan.pyx":966
 *              self._init_2(*args)
 *         elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], float)):
 *              self._init_3(*args)             # <<<<<<<<<<<<<<
 *         elif (len(args)==4) and (isinstance(args[0], CRichModel)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))) and (isinstance(args[3], float)):
 *              self._init_4(*args)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 966, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "geodesic_chenhan.pyx":965
 *         elif (len(args)==1) and (isinstance(args[0], (int, long))):
 *              self._init_2(*args)
 *         elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], float)):             # <<<<<<<<<<<<<<
 *              self._init_3(*args)
 *         elif (len(args)==4) and (isinstance(args[0], CRichModel)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))) and (isinstance(args[3], float)):
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":967
 *         elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], float)):
 *              self._init_3(*args)
 *         elif (len(args)==4) and (isinstance(args[0], CRichModel)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))) and (isinstance(args[3], float)):             # <<<<<<<<<<<<<<
 *              self._init_4(*args)
 *         else:
 */
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 967, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_5 == 4) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_t_3, __pyx_ptype_16geodesic_chenhan_CRichModel); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 1);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_1 = PyInt_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L19_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 1);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_7 = PyLong_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = (__pyx_t_7 != 0);
  __pyx_t_6 = __pyx_t_1;
  __pyx_L19_bool_binop_done:;
  __pyx_t_1 = (__pyx_t_6 != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 2);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyInt_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L22_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 2);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_7 = PyLong_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_6;
  __pyx_L22_bool_binop_done:;
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_v_args, 3);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_6 = PyFloat_Check(__pyx_t_3); 
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = (__pyx_t_6 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L15_bool_binop_done:;
  if (likely(__pyx_t_2)) {

    /* "geodesic_chenhan.pyx":968
 *              self._init_3(*args)
 *         elif (len(args)==4) and (isinstance(args[0], CRichModel)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))) and (isinstance(args[3], float)):
 *              self._init_4(*args)             # <<<<<<<<<<<<<<
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":967
 *         elif (len(args)==2) and (isinstance(args[0], (int, long))) and (isinstance(args[1], float)):
 *              self._init_3(*args)
 *         elif (len(args)==4) and (isinstance(args[0], CRichModel)) and (isinstance(args[1], (int, long))) and (isinstance(args[2], (int, long))) and (isinstance(args[3], float)):             # <<<<<<<<<<<<<<
 *              self._init_4(*args)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":970
 *              self._init_4(*args)
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))             # <<<<<<<<<<<<<<
 * 
 *     def Get3DPoint(self, CRichModel in_0 ):
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_args), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_not_handle_type_of, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 970, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "geodesic_chenhan.pyx":951
 *         self.inst = shared_ptr[_EdgePoint](new _EdgePoint((deref(in_0.inst.get())), (<int>in_1), (<int>in_2), (<double>in_3)))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void EdgePoint()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":972
 *                raise Exception('can not handle type of %s' % (args,))
 * 
 *     def Get3DPoint(self, CRichModel in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: CPoint3D Get3DPoint(CRichModel)"""
 *         assert isinstance(in_0, CRichModel), 'arg in_0 wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_15Get3DPoint(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0); /*proto*/
static char __pyx_doc_16geodesic_chenhan_9EdgePoint_14Get3DPoint[] = "Cython signature: CPoint3D Get3DPoint(CRichModel)";
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_15Get3DPoint(PyObject *__pyx_v_self, PyObject *__pyx_v_in_0) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Get3DPoint (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_in_0), __pyx_ptype_16geodesic_chenhan_CRichModel, 1, "in_0", 0))) __PYX_ERR(1, 972, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_14Get3DPoint(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), ((struct __pyx_obj_16geodesic_chenhan_CRichModel *)__pyx_v_in_0));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_14Get3DPoint(struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_CRichModel *__pyx_v_in_0) {
  CPoint3D *__pyx_v__r;
  struct __pyx_obj_16geodesic_chenhan_CPoint3D *__pyx_v_py_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Get3DPoint", 0);

  /* "geodesic_chenhan.pyx":974
 *     def Get3DPoint(self, CRichModel in_0 ):
 *         """Cython signature: CPoint3D Get3DPoint(CRichModel)"""
 *         assert isinstance(in_0, CRichModel), 'arg in_0 wrong type'             # <<<<<<<<<<<<<<
 * 
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Get3DPoint((deref(in_0.inst.get()))))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_in_0), __pyx_ptype_16geodesic_chenhan_CRichModel); 
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_in_0_wrong_type);
      __PYX_ERR(1, 974, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":976
 *         assert isinstance(in_0, CRichModel), 'arg in_0 wrong type'
 * 
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Get3DPoint((deref(in_0.inst.get()))))             # <<<<<<<<<<<<<<
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)
 *         py_result.inst = shared_ptr[_CPoint3D](_r)
 */
  __pyx_v__r = new CPoint3D(__pyx_v_self->inst.get()->Get3DPoint((*__pyx_v_in_0->inst.get())));

  /* "geodesic_chenhan.pyx":977
 * 
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Get3DPoint((deref(in_0.inst.get()))))
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)             # <<<<<<<<<<<<<<
 *         py_result.inst = shared_ptr[_CPoint3D](_r)
 *         return py_result
 */
  __pyx_t_2 = ((PyObject *)__pyx_tp_new_16geodesic_chenhan_CPoint3D(((PyTypeObject *)__pyx_ptype_16geodesic_chenhan_CPoint3D), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 977, __pyx_L1_error)
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_py_result = ((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "geodesic_chenhan.pyx":978
 *         cdef _CPoint3D * _r = new _CPoint3D(self.inst.get().Get3DPoint((deref(in_0.inst.get()))))
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)
 *         py_result.inst = shared_ptr[_CPoint3D](_r)             # <<<<<<<<<<<<<<
 *         return py_result
 * 
 */
  __pyx_v_py_result->inst = boost::shared_ptr<CPoint3D> (__pyx_v__r);

  /* "geodesic_chenhan.pyx":979
 *         cdef CPoint3D py_result = CPoint3D.__new__(CPoint3D)
 *         py_result.inst = shared_ptr[_CPoint3D](_r)
 *         return py_result             # <<<<<<<<<<<<<<
 * 
 * cdef class InfoAtVertex:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_py_result));
  __pyx_r = ((PyObject *)__pyx_v_py_result);
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":972
 *                raise Exception('can not handle type of %s' % (args,))
 * 
 *     def Get3DPoint(self, CRichModel in_0 ):             # <<<<<<<<<<<<<<
 *         """Cython signature: CPoint3D Get3DPoint(CRichModel)"""
 *         assert isinstance(in_0, CRichModel), 'arg in_0 wrong type'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.Get3DPoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_py_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_16__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_9EdgePoint_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_9EdgePoint_18__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_9EdgePoint_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_EdgePoint *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.EdgePoint.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":988
 *     cdef shared_ptr[_InfoAtVertex] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

/* Python wrapper */
static void __pyx_pw_16geodesic_chenhan_12InfoAtVertex_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_16geodesic_chenhan_12InfoAtVertex_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_16geodesic_chenhan_12InfoAtVertex___dealloc__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_16geodesic_chenhan_12InfoAtVertex___dealloc__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "geodesic_chenhan.pyx":989
 * 
 *     def __dealloc__(self):
 *          self.inst.reset()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.reset();

  /* "geodesic_chenhan.pyx":988
 *     cdef shared_ptr[_InfoAtVertex] inst
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *          self.inst.reset()
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "geodesic_chenhan.pyx":993
 * 
 *     property fParentIsPseudoSource:
 *         def __set__(self,  fParentIsPseudoSource):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().fParentIsPseudoSource = (<bool>fParentIsPseudoSource)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fParentIsPseudoSource); /*proto*/
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_fParentIsPseudoSource) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource___set__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), ((PyObject *)__pyx_v_fParentIsPseudoSource));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_fParentIsPseudoSource) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  bool __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":995
 *         def __set__(self,  fParentIsPseudoSource):
 * 
 *             self.inst.get().fParentIsPseudoSource = (<bool>fParentIsPseudoSource)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_fParentIsPseudoSource); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(1, 995, __pyx_L1_error)
  __pyx_v_self->inst.get()->fParentIsPseudoSource = ((bool)__pyx_t_1);

  /* "geodesic_chenhan.pyx":993
 * 
 *     property fParentIsPseudoSource:
 *         def __set__(self,  fParentIsPseudoSource):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().fParentIsPseudoSource = (<bool>fParentIsPseudoSource)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.fParentIsPseudoSource.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":998
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef bool _r = self.inst.get().fParentIsPseudoSource
 *             py_result = <bool>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource_2__get__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  bool __pyx_v__r;
  bool __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  bool __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":999
 * 
 *         def __get__(self):
 *             cdef bool _r = self.inst.get().fParentIsPseudoSource             # <<<<<<<<<<<<<<
 *             py_result = <bool>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->fParentIsPseudoSource;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":1000
 *         def __get__(self):
 *             cdef bool _r = self.inst.get().fParentIsPseudoSource
 *             py_result = <bool>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((bool)__pyx_v__r);

  /* "geodesic_chenhan.pyx":1001
 *             cdef bool _r = self.inst.get().fParentIsPseudoSource
 *             py_result = <bool>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property birthTime:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":998
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef bool _r = self.inst.get().fParentIsPseudoSource
 *             py_result = <bool>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.fParentIsPseudoSource.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1004
 * 
 *     property birthTime:
 *         def __set__(self, bytes birthTime):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().birthTime = (<char>((birthTime)[0]))
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_9birthTime_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_birthTime); /*proto*/
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_9birthTime_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_birthTime) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_birthTime), (&PyBytes_Type), 1, "birthTime", 1))) __PYX_ERR(1, 1004, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_9birthTime___set__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), ((PyObject*)__pyx_v_birthTime));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_9birthTime___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_birthTime) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  char __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":1006
 *         def __set__(self, bytes birthTime):
 * 
 *             self.inst.get().birthTime = (<char>((birthTime)[0]))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (unlikely(__pyx_v_birthTime == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 1006, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_GetItemInt(__pyx_v_birthTime, 0, 0); if (unlikely(__pyx_t_1 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(1, 1006, __pyx_L1_error)
  __pyx_v_self->inst.get()->birthTime = ((char)__pyx_t_1);

  /* "geodesic_chenhan.pyx":1004
 * 
 *     property birthTime:
 *         def __set__(self, bytes birthTime):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().birthTime = (<char>((birthTime)[0]))
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.birthTime.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1009
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char  _r = self.inst.get().birthTime
 *             py_result = chr(<char>(_r))
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_9birthTime_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_9birthTime_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_9birthTime_2__get__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_9birthTime_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  char __pyx_v__r;
  PyObject *__pyx_v_py_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":1010
 * 
 *         def __get__(self):
 *             cdef char  _r = self.inst.get().birthTime             # <<<<<<<<<<<<<<
 *             py_result = chr(<char>(_r))
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->birthTime;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":1011
 *         def __get__(self):
 *             cdef char  _r = self.inst.get().birthTime
 *             py_result = chr(<char>(_r))             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_char(((char)__pyx_v__r)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_chr, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_py_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "geodesic_chenhan.pyx":1012
 *             cdef char  _r = self.inst.get().birthTime
 *             py_result = chr(<char>(_r))
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property indexOfParent:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_py_result);
  __pyx_r = __pyx_v_py_result;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":1009
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef char  _r = self.inst.get().birthTime
 *             py_result = chr(<char>(_r))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.birthTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_py_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1015
 * 
 *     property indexOfParent:
 *         def __set__(self,  indexOfParent):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfParent = (<int>indexOfParent)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_13indexOfParent_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfParent); /*proto*/
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_13indexOfParent_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfParent) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_13indexOfParent___set__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), ((PyObject *)__pyx_v_indexOfParent));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_13indexOfParent___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_indexOfParent) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":1017
 *         def __set__(self,  indexOfParent):
 * 
 *             self.inst.get().indexOfParent = (<int>indexOfParent)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_indexOfParent); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1017, __pyx_L1_error)
  __pyx_v_self->inst.get()->indexOfParent = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":1015
 * 
 *     property indexOfParent:
 *         def __set__(self,  indexOfParent):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfParent = (<int>indexOfParent)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.indexOfParent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1020
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfParent
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_13indexOfParent_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_13indexOfParent_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_13indexOfParent_2__get__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_13indexOfParent_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":1021
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfParent             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->indexOfParent;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":1022
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfParent
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":1023
 *             cdef int _r = self.inst.get().indexOfParent
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property indexOfRootVertOfParent:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":1020
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfParent
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.indexOfParent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1026
 * 
 *     property indexOfRootVertOfParent:
 *         def __set__(self,  indexOfRootVertOfParent):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfRootVertOfParent = (<int>indexOfRootVertOfParent)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfRootVertOfParent); /*proto*/
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_indexOfRootVertOfParent) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent___set__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), ((PyObject *)__pyx_v_indexOfRootVertOfParent));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_indexOfRootVertOfParent) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":1028
 *         def __set__(self,  indexOfRootVertOfParent):
 * 
 *             self.inst.get().indexOfRootVertOfParent = (<int>indexOfRootVertOfParent)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_indexOfRootVertOfParent); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1028, __pyx_L1_error)
  __pyx_v_self->inst.get()->indexOfRootVertOfParent = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":1026
 * 
 *     property indexOfRootVertOfParent:
 *         def __set__(self,  indexOfRootVertOfParent):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().indexOfRootVertOfParent = (<int>indexOfRootVertOfParent)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.indexOfRootVertOfParent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1031
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfRootVertOfParent
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent_2__get__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":1032
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfRootVertOfParent             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->indexOfRootVertOfParent;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":1033
 *         def __get__(self):
 *             cdef int _r = self.inst.get().indexOfRootVertOfParent
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":1034
 *             cdef int _r = self.inst.get().indexOfRootVertOfParent
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property level:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":1031
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().indexOfRootVertOfParent
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.indexOfRootVertOfParent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1037
 * 
 *     property level:
 *         def __set__(self,  level):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().level = (<int>level)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_5level_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_level); /*proto*/
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_5level_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_level) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_5level___set__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), ((PyObject *)__pyx_v_level));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_5level___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_level) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":1039
 *         def __set__(self,  level):
 * 
 *             self.inst.get().level = (<int>level)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_level); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1039, __pyx_L1_error)
  __pyx_v_self->inst.get()->level = ((int)__pyx_t_1);

  /* "geodesic_chenhan.pyx":1037
 * 
 *     property level:
 *         def __set__(self,  level):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().level = (<int>level)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.level.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1042
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().level
 *             py_result = <int>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_5level_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_5level_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_5level_2__get__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_5level_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  int __pyx_v__r;
  int __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":1043
 * 
 *         def __get__(self):
 *             cdef int _r = self.inst.get().level             # <<<<<<<<<<<<<<
 *             py_result = <int>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->level;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":1044
 *         def __get__(self):
 *             cdef int _r = self.inst.get().level
 *             py_result = <int>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((int)__pyx_v__r);

  /* "geodesic_chenhan.pyx":1045
 *             cdef int _r = self.inst.get().level
 *             py_result = <int>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property disUptodate:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":1042
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef int _r = self.inst.get().level
 *             py_result = <int>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.level.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1048
 * 
 *     property disUptodate:
 *         def __set__(self, double disUptodate):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().disUptodate = (<double>disUptodate)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_11disUptodate_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_disUptodate); /*proto*/
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_11disUptodate_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_disUptodate) {
  double __pyx_v_disUptodate;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_disUptodate); {
    __pyx_v_disUptodate = __pyx_PyFloat_AsDouble(__pyx_arg_disUptodate); if (unlikely((__pyx_v_disUptodate == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1048, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.disUptodate.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_11disUptodate___set__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), ((double)__pyx_v_disUptodate));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_11disUptodate___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, double __pyx_v_disUptodate) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":1050
 *         def __set__(self, double disUptodate):
 * 
 *             self.inst.get().disUptodate = (<double>disUptodate)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.get()->disUptodate = ((double)__pyx_v_disUptodate);

  /* "geodesic_chenhan.pyx":1048
 * 
 *     property disUptodate:
 *         def __set__(self, double disUptodate):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().disUptodate = (<double>disUptodate)
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1053
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().disUptodate
 *             py_result = <double>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_11disUptodate_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_11disUptodate_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_11disUptodate_2__get__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_11disUptodate_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":1054
 * 
 *         def __get__(self):
 *             cdef double _r = self.inst.get().disUptodate             # <<<<<<<<<<<<<<
 *             py_result = <double>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->disUptodate;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":1055
 *         def __get__(self):
 *             cdef double _r = self.inst.get().disUptodate
 *             py_result = <double>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":1056
 *             cdef double _r = self.inst.get().disUptodate
 *             py_result = <double>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     property entryProp:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1056, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":1053
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().disUptodate
 *             py_result = <double>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.disUptodate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1059
 * 
 *     property entryProp:
 *         def __set__(self, double entryProp):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().entryProp = (<double>entryProp)
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_9entryProp_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_entryProp); /*proto*/
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_9entryProp_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_entryProp) {
  double __pyx_v_entryProp;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_entryProp); {
    __pyx_v_entryProp = __pyx_PyFloat_AsDouble(__pyx_arg_entryProp); if (unlikely((__pyx_v_entryProp == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 1059, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.entryProp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_9entryProp___set__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), ((double)__pyx_v_entryProp));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_9entryProp___set__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, double __pyx_v_entryProp) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "geodesic_chenhan.pyx":1061
 *         def __set__(self, double entryProp):
 * 
 *             self.inst.get().entryProp = (<double>entryProp)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->inst.get()->entryProp = ((double)__pyx_v_entryProp);

  /* "geodesic_chenhan.pyx":1059
 * 
 *     property entryProp:
 *         def __set__(self, double entryProp):             # <<<<<<<<<<<<<<
 * 
 *             self.inst.get().entryProp = (<double>entryProp)
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1064
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().entryProp
 *             py_result = <double>_r
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_9entryProp_3__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_9entryProp_3__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_9entryProp_2__get__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_9entryProp_2__get__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  double __pyx_v__r;
  double __pyx_v_py_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "geodesic_chenhan.pyx":1065
 * 
 *         def __get__(self):
 *             cdef double _r = self.inst.get().entryProp             # <<<<<<<<<<<<<<
 *             py_result = <double>_r
 *             return py_result
 */
  __pyx_t_1 = __pyx_v_self->inst.get()->entryProp;
  __pyx_v__r = __pyx_t_1;

  /* "geodesic_chenhan.pyx":1066
 *         def __get__(self):
 *             cdef double _r = self.inst.get().entryProp
 *             py_result = <double>_r             # <<<<<<<<<<<<<<
 *             return py_result
 * 
 */
  __pyx_v_py_result = ((double)__pyx_v__r);

  /* "geodesic_chenhan.pyx":1067
 *             cdef double _r = self.inst.get().entryProp
 *             py_result = <double>_r
 *             return py_result             # <<<<<<<<<<<<<<
 * 
 *     def _init_0(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_py_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "geodesic_chenhan.pyx":1064
 * 
 * 
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef double _r = self.inst.get().entryProp
 *             py_result = <double>_r
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.entryProp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1069
 *             return py_result
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void InfoAtVertex()"""
 *         self.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex())
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_16geodesic_chenhan_12InfoAtVertex_2_init_0[] = "Cython signature: void InfoAtVertex()";
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_3_init_0(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0 (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_2_init_0(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_2_init_0(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_0", 0);

  /* "geodesic_chenhan.pyx":1071
 *     def _init_0(self):
 *         """Cython signature: void InfoAtVertex()"""
 *         self.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex())             # <<<<<<<<<<<<<<
 * 
 *     def _init_1(self, InfoAtVertex other ):
 */
  __pyx_v_self->inst = boost::shared_ptr<InfoAtVertex> (new InfoAtVertex());

  /* "geodesic_chenhan.pyx":1069
 *             return py_result
 * 
 *     def _init_0(self):             # <<<<<<<<<<<<<<
 *         """Cython signature: void InfoAtVertex()"""
 *         self.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex())
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1073
 *         self.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex())
 * 
 *     def _init_1(self, InfoAtVertex other ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void InfoAtVertex(InfoAtVertex other)"""
 *         assert isinstance(other, InfoAtVertex), 'arg other wrong type'
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static char __pyx_doc_16geodesic_chenhan_12InfoAtVertex_4_init_1[] = "Cython signature: void InfoAtVertex(InfoAtVertex other)";
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_5_init_1(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init_1 (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_16geodesic_chenhan_InfoAtVertex, 1, "other", 0))) __PYX_ERR(1, 1073, __pyx_L1_error)
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_4_init_1(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), ((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_4_init_1(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_1", 0);

  /* "geodesic_chenhan.pyx":1075
 *     def _init_1(self, InfoAtVertex other ):
 *         """Cython signature: void InfoAtVertex(InfoAtVertex other)"""
 *         assert isinstance(other, InfoAtVertex), 'arg other wrong type'             # <<<<<<<<<<<<<<
 * 
 *         self.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex((deref(other.inst.get()))))
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_other), __pyx_ptype_16geodesic_chenhan_InfoAtVertex); 
    if (unlikely(!(__pyx_t_1 != 0))) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_arg_other_wrong_type);
      __PYX_ERR(1, 1075, __pyx_L1_error)
    }
  }
  #endif

  /* "geodesic_chenhan.pyx":1077
 *         assert isinstance(other, InfoAtVertex), 'arg other wrong type'
 * 
 *         self.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex((deref(other.inst.get()))))             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, *args , **kwargs):
 */
  __pyx_v_self->inst = boost::shared_ptr<InfoAtVertex> (new InfoAtVertex((*__pyx_v_other->inst.get())));

  /* "geodesic_chenhan.pyx":1073
 *         self.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex())
 * 
 *     def _init_1(self, InfoAtVertex other ):             # <<<<<<<<<<<<<<
 *         """Cython signature: void InfoAtVertex(InfoAtVertex other)"""
 *         assert isinstance(other, InfoAtVertex), 'arg other wrong type'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex._init_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "geodesic_chenhan.pyx":1079
 *         self.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex((deref(other.inst.get()))))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void InfoAtVertex()
 */

/* Python wrapper */
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_16geodesic_chenhan_12InfoAtVertex_6__init__[] = "\n          - Cython signature: void InfoAtVertex()\n          - Cython signature: void InfoAtVertex(InfoAtVertex other)\n";
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_16geodesic_chenhan_12InfoAtVertex_6__init__;
#endif
static int __pyx_pw_16geodesic_chenhan_12InfoAtVertex_7__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_6__init__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_16geodesic_chenhan_12InfoAtVertex_6__init__(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "geodesic_chenhan.pyx":1084
 *           - Cython signature: void InfoAtVertex(InfoAtVertex other)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], InfoAtVertex)):
 */
  __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_args) != 0);
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "geodesic_chenhan.pyx":1085
 * """
 *         if not args:
 *              self._init_0(*args)             # <<<<<<<<<<<<<<
 *         elif (len(args)==1) and (isinstance(args[0], InfoAtVertex)):
 *              self._init_1(*args)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_v_args, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "geodesic_chenhan.pyx":1084
 *           - Cython signature: void InfoAtVertex(InfoAtVertex other)
 * """
 *         if not args:             # <<<<<<<<<<<<<<
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], InfoAtVertex)):
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":1086
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], InfoAtVertex)):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         else:
 */
  __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 1086, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_5 == 1) != 0);
  if (__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_v_args, 0);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_t_4, __pyx_ptype_16geodesic_chenhan_InfoAtVertex); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__pyx_t_1 != 0);
  __pyx_t_2 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (likely(__pyx_t_2)) {

    /* "geodesic_chenhan.pyx":1087
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], InfoAtVertex)):
 *              self._init_1(*args)             # <<<<<<<<<<<<<<
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_v_args, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "geodesic_chenhan.pyx":1086
 *         if not args:
 *              self._init_0(*args)
 *         elif (len(args)==1) and (isinstance(args[0], InfoAtVertex)):             # <<<<<<<<<<<<<<
 *              self._init_1(*args)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "geodesic_chenhan.pyx":1089
 *              self._init_1(*args)
 *         else:
 *                raise Exception('can not handle type of %s' % (args,))             # <<<<<<<<<<<<<<
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_v_args), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_can_not_handle_type_of, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 1089, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "geodesic_chenhan.pyx":1079
 *         self.inst = shared_ptr[_InfoAtVertex](new _InfoAtVertex((deref(other.inst.get()))))
 * 
 *     def __init__(self, *args , **kwargs):             # <<<<<<<<<<<<<<
 *         """
 *           - Cython signature: void InfoAtVertex()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_8__reduce_cython__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_16geodesic_chenhan_12InfoAtVertex_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_16geodesic_chenhan_12InfoAtVertex_10__setstate_cython__(((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_16geodesic_chenhan_12InfoAtVertex_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("geodesic_chenhan.InfoAtVertex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "set.from_py":108
 * 
 * @cname("__pyx_convert_set_from_py_int")
 * cdef set[X] __pyx_convert_set_from_py_int(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef set[X] s
 *     for item in o:
 */

static std::set<int>  __pyx_convert_set_from_py_int(PyObject *__pyx_v_o) {
  std::set<int>  __pyx_v_s;
  PyObject *__pyx_v_item = NULL;
  std::set<int>  __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert_set_from_py_int", 0);

  /* "set.from_py":110
 * cdef set[X] __pyx_convert_set_from_py_int(object o) except *:
 *     cdef set[X] s
 *     for item in o:             # <<<<<<<<<<<<<<
 *         s.insert(<X>item)
 *     return s
 */
  if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) {
    __pyx_t_1 = __pyx_v_o; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 110, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 110, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 110, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 110, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "set.from_py":111
 *     cdef set[X] s
 *     for item in o:
 *         s.insert(<X>item)             # <<<<<<<<<<<<<<
 *     return s
 * 
 */
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_item); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L1_error)
    __pyx_v_s.insert(((int)__pyx_t_5));

    /* "set.from_py":110
 * cdef set[X] __pyx_convert_set_from_py_int(object o) except *:
 *     cdef set[X] s
 *     for item in o:             # <<<<<<<<<<<<<<
 *         s.insert(<X>item)
 *     return s
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "set.from_py":112
 *     for item in o:
 *         s.insert(<X>item)
 *     return s             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "set.from_py":108
 * 
 * @cname("__pyx_convert_set_from_py_int")
 * cdef set[X] __pyx_convert_set_from_py_int(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef set[X] s
 *     for item in o:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("set.from_py.__pyx_convert_set_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_16geodesic_chenhan_CBaseModel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_CBaseModel *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_CBaseModel *)o);
  new((void*)&(p->inst)) boost::shared_ptr<CBaseModel> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_CBaseModel(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_CBaseModel *p = (struct __pyx_obj_16geodesic_chenhan_CBaseModel *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_10CBaseModel_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_CBaseModel[] = {
  {"LoadModel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_10CBaseModel_5LoadModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_10CBaseModel_4LoadModel},
  {"GetNumOfVerts", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CBaseModel_7GetNumOfVerts, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CBaseModel_6GetNumOfVerts},
  {"GetNumOfFaces", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CBaseModel_9GetNumOfFaces, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CBaseModel_8GetNumOfFaces},
  {"isAValidModel", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CBaseModel_11isAValidModel, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CBaseModel_10isAValidModel},
  {"Vert", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CBaseModel_13Vert, METH_O, __pyx_doc_16geodesic_chenhan_10CBaseModel_12Vert},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CBaseModel_15__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CBaseModel_17__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_CBaseModel = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.CBaseModel", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_CBaseModel), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_CBaseModel, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _CBaseModel\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_CBaseModel, /*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*/
  __pyx_pw_16geodesic_chenhan_10CBaseModel_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_CBaseModel, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_16geodesic_chenhan_CEdge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_CEdge *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_CEdge *)o);
  new((void*)&(p->inst)) boost::shared_ptr<CEdge> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_CEdge(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_CEdge *p = (struct __pyx_obj_16geodesic_chenhan_CEdge *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_5CEdge_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_16geodesic_chenhan_5CEdge_indexOfLeftVert(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftVert_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfLeftVert(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftVert_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_5CEdge_indexOfRightVert(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightVert_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfRightVert(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightVert_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_5CEdge_indexOfOppositeVert(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_5CEdge_19indexOfOppositeVert_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfOppositeVert(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_5CEdge_19indexOfOppositeVert_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_5CEdge_indexOfLeftEdge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftEdge_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfLeftEdge(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_5CEdge_15indexOfLeftEdge_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_5CEdge_indexOfRightEdge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightEdge_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfRightEdge(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfRightEdge_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_5CEdge_indexOfReverseEdge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_5CEdge_18indexOfReverseEdge_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfReverseEdge(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_5CEdge_18indexOfReverseEdge_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_5CEdge_indexOfFrontFace(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfFrontFace_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfFrontFace(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_5CEdge_16indexOfFrontFace_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_5CEdge_length(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_5CEdge_6length_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_5CEdge_length(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_5CEdge_6length_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_CEdge[] = {
  {"_init_0", (PyCFunction)__pyx_pw_16geodesic_chenhan_5CEdge_3_init_0, METH_NOARGS, __pyx_doc_16geodesic_chenhan_5CEdge_2_init_0},
  {"_init_1", (PyCFunction)__pyx_pw_16geodesic_chenhan_5CEdge_5_init_1, METH_O, __pyx_doc_16geodesic_chenhan_5CEdge_4_init_1},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_5CEdge_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_5CEdge_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_16geodesic_chenhan_CEdge[] = {
  {(char *)"indexOfLeftVert", __pyx_getprop_16geodesic_chenhan_5CEdge_indexOfLeftVert, __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfLeftVert, (char *)0, 0},
  {(char *)"indexOfRightVert", __pyx_getprop_16geodesic_chenhan_5CEdge_indexOfRightVert, __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfRightVert, (char *)0, 0},
  {(char *)"indexOfOppositeVert", __pyx_getprop_16geodesic_chenhan_5CEdge_indexOfOppositeVert, __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfOppositeVert, (char *)0, 0},
  {(char *)"indexOfLeftEdge", __pyx_getprop_16geodesic_chenhan_5CEdge_indexOfLeftEdge, __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfLeftEdge, (char *)0, 0},
  {(char *)"indexOfRightEdge", __pyx_getprop_16geodesic_chenhan_5CEdge_indexOfRightEdge, __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfRightEdge, (char *)0, 0},
  {(char *)"indexOfReverseEdge", __pyx_getprop_16geodesic_chenhan_5CEdge_indexOfReverseEdge, __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfReverseEdge, (char *)0, 0},
  {(char *)"indexOfFrontFace", __pyx_getprop_16geodesic_chenhan_5CEdge_indexOfFrontFace, __pyx_setprop_16geodesic_chenhan_5CEdge_indexOfFrontFace, (char *)0, 0},
  {(char *)"length", __pyx_getprop_16geodesic_chenhan_5CEdge_length, __pyx_setprop_16geodesic_chenhan_5CEdge_length, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_CEdge = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.CEdge", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_CEdge), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_CEdge, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _CEdge\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_CEdge, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_16geodesic_chenhan_CEdge, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_16geodesic_chenhan_5CEdge_7__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_CEdge, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_16geodesic_chenhan_CFace(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_CFace *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_CFace *)o);
  new((void*)&(p->inst)) boost::shared_ptr<CFace> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_CFace(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_CFace *p = (struct __pyx_obj_16geodesic_chenhan_CFace *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_5CFace_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_CFace[] = {
  {"_init_0", (PyCFunction)__pyx_pw_16geodesic_chenhan_5CFace_3_init_0, METH_NOARGS, __pyx_doc_16geodesic_chenhan_5CFace_2_init_0},
  {"_init_1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_5CFace_5_init_1, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_5CFace_4_init_1},
  {"setIndices", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_5CFace_9setIndices, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_5CFace_8setIndices},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_5CFace_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_5CFace_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_CFace = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.CFace", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_CFace), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_CFace, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _CFace\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_CFace, /*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*/
  __pyx_pw_16geodesic_chenhan_5CFace_7__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_CFace, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_16geodesic_chenhan_CICHWithFurtherPriorityQueue(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)o);
  new((void*)&(p->inst)) boost::shared_ptr<CICHWithFurtherPriorityQueue> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_CICHWithFurtherPriorityQueue(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *p = (struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_CICHWithFurtherPriorityQueue[] = {
  {"GetRootSourceOfVert", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_5GetRootSourceOfVert, METH_O, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_4GetRootSourceOfVert},
  {"FindSourceVertex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_7FindSourceVertex, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_6FindSourceVertex},
  {"PickShortestPaths", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_9PickShortestPaths, METH_O, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_8PickShortestPaths},
  {"Execute", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_11Execute, METH_NOARGS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_10Execute},
  {"GetRunTime", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_13GetRunTime, METH_NOARGS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_12GetRunTime},
  {"GetMemoryCost", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_15GetMemoryCost, METH_NOARGS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_14GetMemoryCost},
  {"GetWindowNum", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_17GetWindowNum, METH_NOARGS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_16GetWindowNum},
  {"GetMaxLenOfQue", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_19GetMaxLenOfQue, METH_NOARGS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_18GetMaxLenOfQue},
  {"GetNPE", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_21GetNPE, METH_NOARGS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_20GetNPE},
  {"GetDepthOfSequenceTree", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_23GetDepthOfSequenceTree, METH_NOARGS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_22GetDepthOfSequenceTree},
  {"HasBeenCompleted", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_25HasBeenCompleted, METH_NOARGS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_24HasBeenCompleted},
  {"GetVertexDistances", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_27GetVertexDistances, METH_NOARGS, __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_26GetVertexDistances},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_29__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_31__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.CICHWithFurtherPriorityQueue", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_CICHWithFurtherPriorityQueue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_CICHWithFurtherPriorityQueue, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _CICHWithFurtherPriorityQueue\n     -- Inherits from ['CImprovedCHWithEdgeValve']\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_CICHWithFurtherPriorityQueue, /*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*/
  __pyx_pw_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_CICHWithFurtherPriorityQueue, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_16geodesic_chenhan_CImprovedCHWithEdgeValve(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)o);
  new((void*)&(p->inst)) boost::shared_ptr<CImprovedCHWithEdgeValve> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_CImprovedCHWithEdgeValve(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *p = (struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_CImprovedCHWithEdgeValve[] = {
  {"GetRootSourceOfVert", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_5GetRootSourceOfVert, METH_O, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_4GetRootSourceOfVert},
  {"FindSourceVertex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_7FindSourceVertex, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_6FindSourceVertex},
  {"PickShortestPaths", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_9PickShortestPaths, METH_O, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_8PickShortestPaths},
  {"Execute", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_11Execute, METH_NOARGS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_10Execute},
  {"GetRunTime", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_13GetRunTime, METH_NOARGS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_12GetRunTime},
  {"GetMemoryCost", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_15GetMemoryCost, METH_NOARGS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_14GetMemoryCost},
  {"GetWindowNum", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_17GetWindowNum, METH_NOARGS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_16GetWindowNum},
  {"GetMaxLenOfQue", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_19GetMaxLenOfQue, METH_NOARGS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_18GetMaxLenOfQue},
  {"GetNPE", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_21GetNPE, METH_NOARGS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_20GetNPE},
  {"GetDepthOfSequenceTree", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_23GetDepthOfSequenceTree, METH_NOARGS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_22GetDepthOfSequenceTree},
  {"HasBeenCompleted", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_25HasBeenCompleted, METH_NOARGS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_24HasBeenCompleted},
  {"GetVertexDistances", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_27GetVertexDistances, METH_NOARGS, __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_26GetVertexDistances},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_29__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_31__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.CImprovedCHWithEdgeValve", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_CImprovedCHWithEdgeValve), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_CImprovedCHWithEdgeValve, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _CImprovedCHWithEdgeValve\n     -- Inherits from ['CPreviousCH']\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_CImprovedCHWithEdgeValve, /*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*/
  __pyx_pw_16geodesic_chenhan_24CImprovedCHWithEdgeValve_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_CImprovedCHWithEdgeValve, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_16geodesic_chenhan_CPoint3D(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_CPoint3D *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_CPoint3D *)o);
  new((void*)&(p->inst)) boost::shared_ptr<CPoint3D> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_CPoint3D(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_CPoint3D *p = (struct __pyx_obj_16geodesic_chenhan_CPoint3D *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_8CPoint3D_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_16geodesic_chenhan_8CPoint3D_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_8CPoint3D_1x_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_8CPoint3D_x(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_8CPoint3D_1x_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_8CPoint3D_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_8CPoint3D_1y_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_8CPoint3D_y(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_8CPoint3D_1y_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_8CPoint3D_z(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_8CPoint3D_1z_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_8CPoint3D_z(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_8CPoint3D_1z_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_CPoint3D[] = {
  {"_init_0", (PyCFunction)__pyx_pw_16geodesic_chenhan_8CPoint3D_3_init_0, METH_NOARGS, __pyx_doc_16geodesic_chenhan_8CPoint3D_2_init_0},
  {"_init_1", (PyCFunction)__pyx_pw_16geodesic_chenhan_8CPoint3D_5_init_1, METH_O, __pyx_doc_16geodesic_chenhan_8CPoint3D_4_init_1},
  {"_init_2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_8CPoint3D_7_init_2, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_8CPoint3D_6_init_2},
  {"Normalize", (PyCFunction)__pyx_pw_16geodesic_chenhan_8CPoint3D_11Normalize, METH_NOARGS, __pyx_doc_16geodesic_chenhan_8CPoint3D_10Normalize},
  {"Len", (PyCFunction)__pyx_pw_16geodesic_chenhan_8CPoint3D_13Len, METH_NOARGS, __pyx_doc_16geodesic_chenhan_8CPoint3D_12Len},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_8CPoint3D_15__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_8CPoint3D_17__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_16geodesic_chenhan_CPoint3D[] = {
  {(char *)"x", __pyx_getprop_16geodesic_chenhan_8CPoint3D_x, __pyx_setprop_16geodesic_chenhan_8CPoint3D_x, (char *)0, 0},
  {(char *)"y", __pyx_getprop_16geodesic_chenhan_8CPoint3D_y, __pyx_setprop_16geodesic_chenhan_8CPoint3D_y, (char *)0, 0},
  {(char *)"z", __pyx_getprop_16geodesic_chenhan_8CPoint3D_z, __pyx_setprop_16geodesic_chenhan_8CPoint3D_z, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_CPoint3D = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.CPoint3D", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_CPoint3D), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_CPoint3D, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _CPoint3D\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_CPoint3D, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_16geodesic_chenhan_CPoint3D, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_16geodesic_chenhan_8CPoint3D_9__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_CPoint3D, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_16geodesic_chenhan_CPreviousCH(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_CPreviousCH *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)o);
  new((void*)&(p->inst)) boost::shared_ptr<CPreviousCH> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_CPreviousCH(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_CPreviousCH *p = (struct __pyx_obj_16geodesic_chenhan_CPreviousCH *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_11CPreviousCH_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_CPreviousCH[] = {
  {"GetRootSourceOfVert", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_5GetRootSourceOfVert, METH_O, __pyx_doc_16geodesic_chenhan_11CPreviousCH_4GetRootSourceOfVert},
  {"FindSourceVertex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_11CPreviousCH_7FindSourceVertex, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_6FindSourceVertex},
  {"PickShortestPaths", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_9PickShortestPaths, METH_O, __pyx_doc_16geodesic_chenhan_11CPreviousCH_8PickShortestPaths},
  {"Execute", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_11Execute, METH_NOARGS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_10Execute},
  {"GetRunTime", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_13GetRunTime, METH_NOARGS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_12GetRunTime},
  {"GetMemoryCost", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_15GetMemoryCost, METH_NOARGS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_14GetMemoryCost},
  {"GetWindowNum", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_17GetWindowNum, METH_NOARGS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_16GetWindowNum},
  {"GetMaxLenOfQue", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_19GetMaxLenOfQue, METH_NOARGS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_18GetMaxLenOfQue},
  {"GetNPE", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_21GetNPE, METH_NOARGS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_20GetNPE},
  {"GetDepthOfSequenceTree", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_23GetDepthOfSequenceTree, METH_NOARGS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_22GetDepthOfSequenceTree},
  {"HasBeenCompleted", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_25HasBeenCompleted, METH_NOARGS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_24HasBeenCompleted},
  {"GetVertexDistances", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_27GetVertexDistances, METH_NOARGS, __pyx_doc_16geodesic_chenhan_11CPreviousCH_26GetVertexDistances},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_29__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_11CPreviousCH_31__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_CPreviousCH = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.CPreviousCH", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_CPreviousCH), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_CPreviousCH, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _CPreviousCH\n     -- Inherits from ['CExactMethodForDGP']\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_CPreviousCH, /*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*/
  __pyx_pw_16geodesic_chenhan_11CPreviousCH_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_CPreviousCH, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_16geodesic_chenhan_CRichModel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_CRichModel *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_CRichModel *)o);
  new((void*)&(p->inst)) boost::shared_ptr<CRichModel> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_CRichModel(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_CRichModel *p = (struct __pyx_obj_16geodesic_chenhan_CRichModel *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_10CRichModel_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_CRichModel[] = {
  {"Preprocess", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_5Preprocess, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_4Preprocess},
  {"GetNumOfEdges", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_7GetNumOfEdges, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_6GetNumOfEdges},
  {"GetNumOfValidDirectedEdges", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_9GetNumOfValidDirectedEdges, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_8GetNumOfValidDirectedEdges},
  {"GetNumOfTotalUndirectedEdges", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_11GetNumOfTotalUndirectedEdges, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_10GetNumOfTotalUndirectedEdges},
  {"GetNumOfGenera", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_13GetNumOfGenera, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_12GetNumOfGenera},
  {"GetNumOfIsolated", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_15GetNumOfIsolated, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_14GetNumOfIsolated},
  {"GetNumOfComponents", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_17GetNumOfComponents, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_16GetNumOfComponents},
  {"GetNumOfBoundries", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_19GetNumOfBoundries, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_18GetNumOfBoundries},
  {"IsConvexVert", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_21IsConvexVert, METH_O, __pyx_doc_16geodesic_chenhan_10CRichModel_20IsConvexVert},
  {"isBoundaryVert", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_23isBoundaryVert, METH_O, __pyx_doc_16geodesic_chenhan_10CRichModel_22isBoundaryVert},
  {"IsClosedModel", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_25IsClosedModel, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_24IsClosedModel},
  {"IsExtremeEdge", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_27IsExtremeEdge, METH_O, __pyx_doc_16geodesic_chenhan_10CRichModel_26IsExtremeEdge},
  {"IsStartEdge", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_29IsStartEdge, METH_O, __pyx_doc_16geodesic_chenhan_10CRichModel_28IsStartEdge},
  {"HasBeenProcessed", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_31HasBeenProcessed, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_30HasBeenProcessed},
  {"Edge", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_33Edge, METH_O, __pyx_doc_16geodesic_chenhan_10CRichModel_32Edge},
  {"LoadModel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_10CRichModel_35LoadModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_10CRichModel_34LoadModel},
  {"GetNumOfVerts", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_37GetNumOfVerts, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_36GetNumOfVerts},
  {"GetNumOfFaces", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_39GetNumOfFaces, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_38GetNumOfFaces},
  {"isAValidModel", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_41isAValidModel, METH_NOARGS, __pyx_doc_16geodesic_chenhan_10CRichModel_40isAValidModel},
  {"Vert", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_43Vert, METH_O, __pyx_doc_16geodesic_chenhan_10CRichModel_42Vert},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_45__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_10CRichModel_47__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_CRichModel = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.CRichModel", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_CRichModel), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_CRichModel, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _CRichModel\n     -- Inherits from ['CBaseModel']\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_CRichModel, /*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*/
  __pyx_pw_16geodesic_chenhan_10CRichModel_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_CRichModel, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_16geodesic_chenhan_EdgePoint(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_EdgePoint *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_EdgePoint *)o);
  new((void*)&(p->inst)) boost::shared_ptr<EdgePoint> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_EdgePoint(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_EdgePoint *p = (struct __pyx_obj_16geodesic_chenhan_EdgePoint *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_9EdgePoint_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_16geodesic_chenhan_9EdgePoint_index(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_9EdgePoint_5index_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_9EdgePoint_index(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_9EdgePoint_5index_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_9EdgePoint_leftVertIndex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_9EdgePoint_13leftVertIndex_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_9EdgePoint_leftVertIndex(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_9EdgePoint_13leftVertIndex_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_9EdgePoint_rightVertIndex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_9EdgePoint_14rightVertIndex_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_9EdgePoint_rightVertIndex(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_9EdgePoint_14rightVertIndex_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_9EdgePoint_proportion(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_9EdgePoint_10proportion_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_9EdgePoint_proportion(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_9EdgePoint_10proportion_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_9EdgePoint_isVertex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_9EdgePoint_8isVertex_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_9EdgePoint_isVertex(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_9EdgePoint_8isVertex_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_EdgePoint[] = {
  {"_init_0", (PyCFunction)__pyx_pw_16geodesic_chenhan_9EdgePoint_3_init_0, METH_NOARGS, __pyx_doc_16geodesic_chenhan_9EdgePoint_2_init_0},
  {"_init_1", (PyCFunction)__pyx_pw_16geodesic_chenhan_9EdgePoint_5_init_1, METH_O, __pyx_doc_16geodesic_chenhan_9EdgePoint_4_init_1},
  {"_init_2", (PyCFunction)__pyx_pw_16geodesic_chenhan_9EdgePoint_7_init_2, METH_O, __pyx_doc_16geodesic_chenhan_9EdgePoint_6_init_2},
  {"_init_3", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_9EdgePoint_9_init_3, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_9EdgePoint_8_init_3},
  {"_init_4", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_16geodesic_chenhan_9EdgePoint_11_init_4, METH_VARARGS|METH_KEYWORDS, __pyx_doc_16geodesic_chenhan_9EdgePoint_10_init_4},
  {"Get3DPoint", (PyCFunction)__pyx_pw_16geodesic_chenhan_9EdgePoint_15Get3DPoint, METH_O, __pyx_doc_16geodesic_chenhan_9EdgePoint_14Get3DPoint},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_9EdgePoint_17__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_9EdgePoint_19__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_16geodesic_chenhan_EdgePoint[] = {
  {(char *)"index", __pyx_getprop_16geodesic_chenhan_9EdgePoint_index, __pyx_setprop_16geodesic_chenhan_9EdgePoint_index, (char *)0, 0},
  {(char *)"leftVertIndex", __pyx_getprop_16geodesic_chenhan_9EdgePoint_leftVertIndex, __pyx_setprop_16geodesic_chenhan_9EdgePoint_leftVertIndex, (char *)0, 0},
  {(char *)"rightVertIndex", __pyx_getprop_16geodesic_chenhan_9EdgePoint_rightVertIndex, __pyx_setprop_16geodesic_chenhan_9EdgePoint_rightVertIndex, (char *)0, 0},
  {(char *)"proportion", __pyx_getprop_16geodesic_chenhan_9EdgePoint_proportion, __pyx_setprop_16geodesic_chenhan_9EdgePoint_proportion, (char *)0, 0},
  {(char *)"isVertex", __pyx_getprop_16geodesic_chenhan_9EdgePoint_isVertex, __pyx_setprop_16geodesic_chenhan_9EdgePoint_isVertex, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_EdgePoint = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.EdgePoint", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_EdgePoint), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_EdgePoint, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _EdgePoint\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_EdgePoint, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_16geodesic_chenhan_EdgePoint, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_16geodesic_chenhan_9EdgePoint_13__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_EdgePoint, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_16geodesic_chenhan_InfoAtVertex(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)o);
  new((void*)&(p->inst)) boost::shared_ptr<InfoAtVertex> ();
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan_InfoAtVertex(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *p = (struct __pyx_obj_16geodesic_chenhan_InfoAtVertex *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_16geodesic_chenhan_12InfoAtVertex_1__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  __Pyx_call_destructor(p->inst);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_16geodesic_chenhan_12InfoAtVertex_fParentIsPseudoSource(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_fParentIsPseudoSource(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_21fParentIsPseudoSource_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_12InfoAtVertex_birthTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_9birthTime_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_birthTime(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_9birthTime_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_12InfoAtVertex_indexOfParent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_13indexOfParent_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_indexOfParent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_13indexOfParent_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_12InfoAtVertex_indexOfRootVertOfParent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_indexOfRootVertOfParent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_23indexOfRootVertOfParent_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_12InfoAtVertex_level(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_5level_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_5level_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_12InfoAtVertex_disUptodate(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_11disUptodate_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_disUptodate(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_11disUptodate_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_16geodesic_chenhan_12InfoAtVertex_entryProp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_9entryProp_3__get__(o);
}

static int __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_entryProp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_16geodesic_chenhan_12InfoAtVertex_9entryProp_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_16geodesic_chenhan_InfoAtVertex[] = {
  {"_init_0", (PyCFunction)__pyx_pw_16geodesic_chenhan_12InfoAtVertex_3_init_0, METH_NOARGS, __pyx_doc_16geodesic_chenhan_12InfoAtVertex_2_init_0},
  {"_init_1", (PyCFunction)__pyx_pw_16geodesic_chenhan_12InfoAtVertex_5_init_1, METH_O, __pyx_doc_16geodesic_chenhan_12InfoAtVertex_4_init_1},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_12InfoAtVertex_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_16geodesic_chenhan_12InfoAtVertex_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_16geodesic_chenhan_InfoAtVertex[] = {
  {(char *)"fParentIsPseudoSource", __pyx_getprop_16geodesic_chenhan_12InfoAtVertex_fParentIsPseudoSource, __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_fParentIsPseudoSource, (char *)0, 0},
  {(char *)"birthTime", __pyx_getprop_16geodesic_chenhan_12InfoAtVertex_birthTime, __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_birthTime, (char *)0, 0},
  {(char *)"indexOfParent", __pyx_getprop_16geodesic_chenhan_12InfoAtVertex_indexOfParent, __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_indexOfParent, (char *)0, 0},
  {(char *)"indexOfRootVertOfParent", __pyx_getprop_16geodesic_chenhan_12InfoAtVertex_indexOfRootVertOfParent, __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_indexOfRootVertOfParent, (char *)0, 0},
  {(char *)"level", __pyx_getprop_16geodesic_chenhan_12InfoAtVertex_level, __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_level, (char *)0, 0},
  {(char *)"disUptodate", __pyx_getprop_16geodesic_chenhan_12InfoAtVertex_disUptodate, __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_disUptodate, (char *)0, 0},
  {(char *)"entryProp", __pyx_getprop_16geodesic_chenhan_12InfoAtVertex_entryProp, __pyx_setprop_16geodesic_chenhan_12InfoAtVertex_entryProp, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_16geodesic_chenhan_InfoAtVertex = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.InfoAtVertex", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan_InfoAtVertex), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan_InfoAtVertex, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Cython implementation of _InfoAtVertex\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_16geodesic_chenhan_InfoAtVertex, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_16geodesic_chenhan_InfoAtVertex, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_16geodesic_chenhan_12InfoAtVertex_7__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_16geodesic_chenhan_InfoAtVertex, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct__LoadModel[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct__LoadModel = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct__LoadModel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct__LoadModel > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct__LoadModel[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct__LoadModel];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct__LoadModel(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_faces);
  Py_CLEAR(p->__pyx_v_vertices);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct__LoadModel < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct__LoadModel[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct__LoadModel++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct__LoadModel(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *)o;
  if (p->__pyx_v_faces) {
    e = (*v)(p->__pyx_v_faces, a); if (e) return e;
  }
  if (p->__pyx_v_vertices) {
    e = (*v)(p->__pyx_v_vertices, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct__LoadModel(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel *)o;
  tmp = ((PyObject*)p->__pyx_v_faces);
  p->__pyx_v_faces = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vertices);
  p->__pyx_v_vertices = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct__LoadModel = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct__LoadModel", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct__LoadModel), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct__LoadModel, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct__LoadModel, /*tp_traverse*/
  __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct__LoadModel, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct__LoadModel, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_1_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_1_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_1_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_1_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_1_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_elemt_rec);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_1_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_elemt_rec) {
    e = (*v)(p->__pyx_v_elemt_rec, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_1_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_1_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_1_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_1_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_2_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_2_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_2_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_2_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_2_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_elemt_rec);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_2_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_elemt_rec) {
    e = (*v)(p->__pyx_v_elemt_rec, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_2_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_2_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_2_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_2_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_3___init__[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_3___init__ = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_3___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_3___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_3___init__[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_3___init__];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_3___init__(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_indexOfSourceVerts);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_3___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_3___init__[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_3___init__++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_3___init__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *)o;
  if (p->__pyx_v_indexOfSourceVerts) {
    e = (*v)(p->__pyx_v_indexOfSourceVerts, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_3___init__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__ *)o;
  tmp = ((PyObject*)p->__pyx_v_indexOfSourceVerts);
  p->__pyx_v_indexOfSourceVerts = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_3___init__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_3___init__", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_3___init__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_3___init__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_3___init__, /*tp_traverse*/
  __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_3___init__, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_3___init__, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_4_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_4_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_4_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_4_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_4_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_4_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_li);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_4_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_4_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_li) {
    e = (*v)(p->__pyx_v_li, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_4_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_4_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_4_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_4_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_4_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_4_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_resultingPath);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *)o;
  if (p->__pyx_v_resultingPath) {
    e = (*v)(p->__pyx_v_resultingPath, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex *)o;
  tmp = ((PyObject*)p->__pyx_v_resultingPath);
  p->__pyx_v_resultingPath = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_5_FindSourceVertex", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex, /*tp_traverse*/
  __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_6_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_6_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_6_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_6_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_6_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_elemt_rec);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_6_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_elemt_rec) {
    e = (*v)(p->__pyx_v_elemt_rec, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_6_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_6_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_6_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_6_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_6_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_6_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_7___init__[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_7___init__ = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_7___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_7___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_7___init__[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_7___init__];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_7___init__(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_indexOfSourceVerts);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_7___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_7___init__[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_7___init__++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_7___init__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *)o;
  if (p->__pyx_v_indexOfSourceVerts) {
    e = (*v)(p->__pyx_v_indexOfSourceVerts, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_7___init__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__ *)o;
  tmp = ((PyObject*)p->__pyx_v_indexOfSourceVerts);
  p->__pyx_v_indexOfSourceVerts = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_7___init__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_7___init__", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_7___init__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_7___init__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_7___init__, /*tp_traverse*/
  __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_7___init__, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_7___init__, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_8_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_8_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_8_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_8_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_8_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_8_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_li);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_8_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_8_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_li) {
    e = (*v)(p->__pyx_v_li, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_8_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_8_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_8_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_8_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_8_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_8_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_resultingPath);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *)o;
  if (p->__pyx_v_resultingPath) {
    e = (*v)(p->__pyx_v_resultingPath, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex *)o;
  tmp = ((PyObject*)p->__pyx_v_resultingPath);
  p->__pyx_v_resultingPath = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_9_FindSourceVertex", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex, /*tp_traverse*/
  __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_10_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_10_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_10_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_10_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_10_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_10_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_10_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_elemt_rec);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_10_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_10_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_10_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_10_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_elemt_rec) {
    e = (*v)(p->__pyx_v_elemt_rec, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_10_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_10_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_10_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_10_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_10_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_10_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_11___init__[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_11___init__ = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_11___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_11___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_11___init__[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_11___init__];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_11___init__(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_indexOfSourceVerts);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_11___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_11___init__[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_11___init__++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_11___init__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *)o;
  if (p->__pyx_v_indexOfSourceVerts) {
    e = (*v)(p->__pyx_v_indexOfSourceVerts, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_11___init__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__ *)o;
  tmp = ((PyObject*)p->__pyx_v_indexOfSourceVerts);
  p->__pyx_v_indexOfSourceVerts = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_11___init__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_11___init__", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_11___init__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_11___init__, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_11___init__, /*tp_traverse*/
  __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_11___init__, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_11___init__, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_12_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_12_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_12_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_12_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_12_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_12_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_12_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_li);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_12_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_12_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_12_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_12_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_li) {
    e = (*v)(p->__pyx_v_li, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_12_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_12_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_12_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_12_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_12_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_12_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_resultingPath);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *)o;
  if (p->__pyx_v_resultingPath) {
    e = (*v)(p->__pyx_v_resultingPath, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex *)o;
  tmp = ((PyObject*)p->__pyx_v_resultingPath);
  p->__pyx_v_resultingPath = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_13_FindSourceVertex", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex, /*tp_traverse*/
  __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_14_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_14_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_14_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_14_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_14_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_14_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_14_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_elemt_rec);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_14_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_14_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_14_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_14_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_elemt_rec) {
    e = (*v)(p->__pyx_v_elemt_rec, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_14_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_14_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_14_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_14_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_14_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_14_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_15_LoadModel[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_15_LoadModel = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_15_LoadModel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_15_LoadModel > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_15_LoadModel[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_15_LoadModel];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_15_LoadModel(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_faces);
  Py_CLEAR(p->__pyx_v_vertices);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_15_LoadModel < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_15_LoadModel[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_15_LoadModel++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_15_LoadModel(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *)o;
  if (p->__pyx_v_faces) {
    e = (*v)(p->__pyx_v_faces, a); if (e) return e;
  }
  if (p->__pyx_v_vertices) {
    e = (*v)(p->__pyx_v_vertices, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_15_LoadModel(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel *)o;
  tmp = ((PyObject*)p->__pyx_v_faces);
  p->__pyx_v_faces = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_vertices);
  p->__pyx_v_vertices = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_15_LoadModel = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_15_LoadModel", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_15_LoadModel), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_15_LoadModel, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_15_LoadModel, /*tp_traverse*/
  __pyx_tp_clear_16geodesic_chenhan___pyx_scope_struct_15_LoadModel, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_15_LoadModel, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_16_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_16_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_16_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_16_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_16_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_16_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_16_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_elemt_rec);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_16_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_16_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_16_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_16_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_elemt_rec) {
    e = (*v)(p->__pyx_v_elemt_rec, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_16_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_16_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_16_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_16_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_16_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_16_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_17_genexpr[8];
static int __pyx_freecount_16geodesic_chenhan___pyx_scope_struct_17_genexpr = 0;

static PyObject *__pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_17_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_17_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr)))) {
    o = (PyObject*)__pyx_freelist_16geodesic_chenhan___pyx_scope_struct_17_genexpr[--__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_17_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_17_genexpr(PyObject *o) {
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_elemt_rec);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_17_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr)))) {
    __pyx_freelist_16geodesic_chenhan___pyx_scope_struct_17_genexpr[__pyx_freecount_16geodesic_chenhan___pyx_scope_struct_17_genexpr++] = ((struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_17_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_elemt_rec) {
    e = (*v)(p->__pyx_v_elemt_rec, a); if (e) return e;
  }
  return 0;
}

static PyTypeObject __pyx_type_16geodesic_chenhan___pyx_scope_struct_17_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "geodesic_chenhan.__pyx_scope_struct_17_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_16geodesic_chenhan___pyx_scope_struct_17_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_16geodesic_chenhan___pyx_scope_struct_17_genexpr, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_16geodesic_chenhan___pyx_scope_struct_17_genexpr, /*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*/
  __pyx_tp_new_16geodesic_chenhan___pyx_scope_struct_17_genexpr, /*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 >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_geodesic_chenhan(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_geodesic_chenhan},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "geodesic_chenhan",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_CBaseModel, __pyx_k_CBaseModel, sizeof(__pyx_k_CBaseModel), 0, 0, 1, 1},
  {&__pyx_n_s_CEdge, __pyx_k_CEdge, sizeof(__pyx_k_CEdge), 0, 0, 1, 1},
  {&__pyx_n_s_CFace, __pyx_k_CFace, sizeof(__pyx_k_CFace), 0, 0, 1, 1},
  {&__pyx_n_s_CICHWithFurtherPriorityQueue, __pyx_k_CICHWithFurtherPriorityQueue, sizeof(__pyx_k_CICHWithFurtherPriorityQueue), 0, 0, 1, 1},
  {&__pyx_n_s_CImprovedCHWithEdgeValve, __pyx_k_CImprovedCHWithEdgeValve, sizeof(__pyx_k_CImprovedCHWithEdgeValve), 0, 0, 1, 1},
  {&__pyx_n_s_CPoint3D, __pyx_k_CPoint3D, sizeof(__pyx_k_CPoint3D), 0, 0, 1, 1},
  {&__pyx_n_s_CPreviousCH, __pyx_k_CPreviousCH, sizeof(__pyx_k_CPreviousCH), 0, 0, 1, 1},
  {&__pyx_n_s_CRichModel, __pyx_k_CRichModel, sizeof(__pyx_k_CRichModel), 0, 0, 1, 1},
  {&__pyx_n_s_EdgePoint, __pyx_k_EdgePoint, sizeof(__pyx_k_EdgePoint), 0, 0, 1, 1},
  {&__pyx_n_s_Enum, __pyx_k_Enum, sizeof(__pyx_k_Enum), 0, 0, 1, 1},
  {&__pyx_n_s_FindSourceVertex_locals_genexpr, __pyx_k_FindSourceVertex_locals_genexpr, sizeof(__pyx_k_FindSourceVertex_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_InfoAtVertex, __pyx_k_InfoAtVertex, sizeof(__pyx_k_InfoAtVertex), 0, 0, 1, 1},
  {&__pyx_n_s_LoadModel_locals_genexpr, __pyx_k_LoadModel_locals_genexpr, sizeof(__pyx_k_LoadModel_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_PyEnum, __pyx_k_PyEnum, sizeof(__pyx_k_PyEnum), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_u_arg_faces_wrong_type, __pyx_k_arg_faces_wrong_type, sizeof(__pyx_k_arg_faces_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_in_0_wrong_type, __pyx_k_arg_in_0_wrong_type, sizeof(__pyx_k_arg_in_0_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_in_1_wrong_type, __pyx_k_arg_in_1_wrong_type, sizeof(__pyx_k_arg_in_1_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_in_2_wrong_type, __pyx_k_arg_in_2_wrong_type, sizeof(__pyx_k_arg_in_2_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_in_3_wrong_type, __pyx_k_arg_in_3_wrong_type, sizeof(__pyx_k_arg_in_3_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_indexOfSourceVerts_wrong_typ, __pyx_k_arg_indexOfSourceVerts_wrong_typ, sizeof(__pyx_k_arg_indexOfSourceVerts_wrong_typ), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_indexOfVert_wrong_type, __pyx_k_arg_indexOfVert_wrong_type, sizeof(__pyx_k_arg_indexOfVert_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_index_wrong_type, __pyx_k_arg_index_wrong_type, sizeof(__pyx_k_arg_index_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_inputModel_wrong_type, __pyx_k_arg_inputModel_wrong_type, sizeof(__pyx_k_arg_inputModel_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_num_wrong_type, __pyx_k_arg_num_wrong_type, sizeof(__pyx_k_arg_num_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_other_wrong_type, __pyx_k_arg_other_wrong_type, sizeof(__pyx_k_arg_other_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_resultingPath_wrong_type, __pyx_k_arg_resultingPath_wrong_type, sizeof(__pyx_k_arg_resultingPath_wrong_type), 0, 1, 0, 0},
  {&__pyx_kp_u_arg_vertices_wrong_type, __pyx_k_arg_vertices_wrong_type, sizeof(__pyx_k_arg_vertices_wrong_type), 0, 1, 0, 0},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_kp_u_can_not_handle_type_of, __pyx_k_can_not_handle_type_of, sizeof(__pyx_k_can_not_handle_type_of), 0, 1, 0, 0},
  {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
  {&__pyx_n_s_faces, __pyx_k_faces, sizeof(__pyx_k_faces), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_geodesic_chenhan, __pyx_k_geodesic_chenhan, sizeof(__pyx_k_geodesic_chenhan), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_in_0, __pyx_k_in_0, sizeof(__pyx_k_in_0), 0, 0, 1, 1},
  {&__pyx_n_s_in_1, __pyx_k_in_1, sizeof(__pyx_k_in_1), 0, 0, 1, 1},
  {&__pyx_n_s_in_2, __pyx_k_in_2, sizeof(__pyx_k_in_2), 0, 0, 1, 1},
  {&__pyx_n_s_in_3, __pyx_k_in_3, sizeof(__pyx_k_in_3), 0, 0, 1, 1},
  {&__pyx_n_s_indexOfSourceVerts, __pyx_k_indexOfSourceVerts, sizeof(__pyx_k_indexOfSourceVerts), 0, 0, 1, 1},
  {&__pyx_n_s_indexOfVert, __pyx_k_indexOfVert, sizeof(__pyx_k_indexOfVert), 0, 0, 1, 1},
  {&__pyx_n_s_init_0, __pyx_k_init_0, sizeof(__pyx_k_init_0), 0, 0, 1, 1},
  {&__pyx_n_s_init_1, __pyx_k_init_1, sizeof(__pyx_k_init_1), 0, 0, 1, 1},
  {&__pyx_n_s_init_2, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1},
  {&__pyx_n_s_init_3, __pyx_k_init_3, sizeof(__pyx_k_init_3), 0, 0, 1, 1},
  {&__pyx_n_s_init_4, __pyx_k_init_4, sizeof(__pyx_k_init_4), 0, 0, 1, 1},
  {&__pyx_n_s_init___locals_genexpr, __pyx_k_init___locals_genexpr, sizeof(__pyx_k_init___locals_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_inputModel, __pyx_k_inputModel, sizeof(__pyx_k_inputModel), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_resultingPath, __pyx_k_resultingPath, sizeof(__pyx_k_resultingPath), 0, 0, 1, 1},
  {&__pyx_kp_s_self_inst_cannot_be_converted_to, __pyx_k_self_inst_cannot_be_converted_to, sizeof(__pyx_k_self_inst_cannot_be_converted_to), 0, 0, 1, 0},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_vertices, __pyx_k_vertices, sizeof(__pyx_k_vertices), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
  __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) __PYX_ERR(1, 1011, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "(tree fragment)":4
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.inst cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_self_inst_cannot_be_converted_to); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_CBaseModel) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_CBaseModel.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_CBaseModel.tp_dictoffset && __pyx_type_16geodesic_chenhan_CBaseModel.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_CBaseModel.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_CBaseModel, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 34, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_10CBaseModel_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_10CBaseModel_2__init__.doc = __pyx_doc_16geodesic_chenhan_10CBaseModel_2__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_10CBaseModel_2__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CBaseModel, (PyObject *)&__pyx_type_16geodesic_chenhan_CBaseModel) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_CBaseModel) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_CBaseModel = &__pyx_type_16geodesic_chenhan_CBaseModel;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_CEdge) < 0) __PYX_ERR(1, 92, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_CEdge.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_CEdge.tp_dictoffset && __pyx_type_16geodesic_chenhan_CEdge.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_CEdge.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_CEdge, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 92, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_5CEdge_6__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_5CEdge_6__init__.doc = __pyx_doc_16geodesic_chenhan_5CEdge_6__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_5CEdge_6__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CEdge, (PyObject *)&__pyx_type_16geodesic_chenhan_CEdge) < 0) __PYX_ERR(1, 92, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_CEdge) < 0) __PYX_ERR(1, 92, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_CEdge = &__pyx_type_16geodesic_chenhan_CEdge;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_CFace) < 0) __PYX_ERR(1, 213, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_CFace.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_CFace.tp_dictoffset && __pyx_type_16geodesic_chenhan_CFace.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_CFace.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_CFace, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 213, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_5CFace_6__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_5CFace_6__init__.doc = __pyx_doc_16geodesic_chenhan_5CFace_6__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_5CFace_6__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CFace, (PyObject *)&__pyx_type_16geodesic_chenhan_CFace) < 0) __PYX_ERR(1, 213, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_CFace) < 0) __PYX_ERR(1, 213, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_CFace = &__pyx_type_16geodesic_chenhan_CFace;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue) < 0) __PYX_ERR(1, 260, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue.tp_dictoffset && __pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 260, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_2__init__.doc = __pyx_doc_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_2__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_28CICHWithFurtherPriorityQueue_2__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CICHWithFurtherPriorityQueue, (PyObject *)&__pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue) < 0) __PYX_ERR(1, 260, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue) < 0) __PYX_ERR(1, 260, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_CICHWithFurtherPriorityQueue = &__pyx_type_16geodesic_chenhan_CICHWithFurtherPriorityQueue;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve) < 0) __PYX_ERR(1, 374, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve.tp_dictoffset && __pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 374, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_24CImprovedCHWithEdgeValve_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_24CImprovedCHWithEdgeValve_2__init__.doc = __pyx_doc_16geodesic_chenhan_24CImprovedCHWithEdgeValve_2__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_24CImprovedCHWithEdgeValve_2__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CImprovedCHWithEdgeValve, (PyObject *)&__pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve) < 0) __PYX_ERR(1, 374, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve) < 0) __PYX_ERR(1, 374, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_CImprovedCHWithEdgeValve = &__pyx_type_16geodesic_chenhan_CImprovedCHWithEdgeValve;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_CPoint3D) < 0) __PYX_ERR(1, 488, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_CPoint3D.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_CPoint3D.tp_dictoffset && __pyx_type_16geodesic_chenhan_CPoint3D.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_CPoint3D.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_CPoint3D, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 488, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_8CPoint3D_8__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_8CPoint3D_8__init__.doc = __pyx_doc_16geodesic_chenhan_8CPoint3D_8__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_8CPoint3D_8__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CPoint3D, (PyObject *)&__pyx_type_16geodesic_chenhan_CPoint3D) < 0) __PYX_ERR(1, 488, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_CPoint3D) < 0) __PYX_ERR(1, 488, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_CPoint3D = &__pyx_type_16geodesic_chenhan_CPoint3D;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_CPreviousCH) < 0) __PYX_ERR(1, 577, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_CPreviousCH.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_CPreviousCH.tp_dictoffset && __pyx_type_16geodesic_chenhan_CPreviousCH.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_CPreviousCH.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_CPreviousCH, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 577, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_11CPreviousCH_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_11CPreviousCH_2__init__.doc = __pyx_doc_16geodesic_chenhan_11CPreviousCH_2__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_11CPreviousCH_2__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CPreviousCH, (PyObject *)&__pyx_type_16geodesic_chenhan_CPreviousCH) < 0) __PYX_ERR(1, 577, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_CPreviousCH) < 0) __PYX_ERR(1, 577, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_CPreviousCH = &__pyx_type_16geodesic_chenhan_CPreviousCH;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_CRichModel) < 0) __PYX_ERR(1, 691, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_CRichModel.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_CRichModel.tp_dictoffset && __pyx_type_16geodesic_chenhan_CRichModel.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_CRichModel.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_CRichModel, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 691, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_10CRichModel_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_10CRichModel_2__init__.doc = __pyx_doc_16geodesic_chenhan_10CRichModel_2__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_10CRichModel_2__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CRichModel, (PyObject *)&__pyx_type_16geodesic_chenhan_CRichModel) < 0) __PYX_ERR(1, 691, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_CRichModel) < 0) __PYX_ERR(1, 691, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_CRichModel = &__pyx_type_16geodesic_chenhan_CRichModel;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_EdgePoint) < 0) __PYX_ERR(1, 849, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_EdgePoint.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_EdgePoint.tp_dictoffset && __pyx_type_16geodesic_chenhan_EdgePoint.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_EdgePoint.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_EdgePoint, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 849, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_9EdgePoint_12__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_9EdgePoint_12__init__.doc = __pyx_doc_16geodesic_chenhan_9EdgePoint_12__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_9EdgePoint_12__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EdgePoint, (PyObject *)&__pyx_type_16geodesic_chenhan_EdgePoint) < 0) __PYX_ERR(1, 849, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_EdgePoint) < 0) __PYX_ERR(1, 849, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_EdgePoint = &__pyx_type_16geodesic_chenhan_EdgePoint;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan_InfoAtVertex) < 0) __PYX_ERR(1, 981, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan_InfoAtVertex.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan_InfoAtVertex.tp_dictoffset && __pyx_type_16geodesic_chenhan_InfoAtVertex.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan_InfoAtVertex.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_16geodesic_chenhan_InfoAtVertex, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(1, 981, __pyx_L1_error)
    if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
      __pyx_wrapperbase_16geodesic_chenhan_12InfoAtVertex_6__init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_16geodesic_chenhan_12InfoAtVertex_6__init__.doc = __pyx_doc_16geodesic_chenhan_12InfoAtVertex_6__init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_16geodesic_chenhan_12InfoAtVertex_6__init__;
    }
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_InfoAtVertex, (PyObject *)&__pyx_type_16geodesic_chenhan_InfoAtVertex) < 0) __PYX_ERR(1, 981, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_16geodesic_chenhan_InfoAtVertex) < 0) __PYX_ERR(1, 981, __pyx_L1_error)
  __pyx_ptype_16geodesic_chenhan_InfoAtVertex = &__pyx_type_16geodesic_chenhan_InfoAtVertex;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct__LoadModel) < 0) __PYX_ERR(1, 49, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct__LoadModel.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct__LoadModel.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct__LoadModel.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct__LoadModel.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct__LoadModel = &__pyx_type_16geodesic_chenhan___pyx_scope_struct__LoadModel;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(1, 51, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_1_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_1_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_1_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_1_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_1_genexpr;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(1, 52, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_2_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_2_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_2_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_2_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_2_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_2_genexpr;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_3___init__) < 0) __PYX_ERR(1, 272, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_3___init__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_3___init__.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_3___init__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_3___init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_3___init__ = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_3___init__;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(1, 275, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_4_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_4_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_4_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_4_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_4_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_4_genexpr;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex) < 0) __PYX_ERR(1, 288, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_5_FindSourceVertex;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(1, 291, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_6_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_6_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_6_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_6_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_6_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_6_genexpr;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_7___init__) < 0) __PYX_ERR(1, 386, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_7___init__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_7___init__.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_7___init__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_7___init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_7___init__ = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_7___init__;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_8_genexpr) < 0) __PYX_ERR(1, 389, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_8_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_8_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_8_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_8_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_8_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_8_genexpr;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex) < 0) __PYX_ERR(1, 402, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_9_FindSourceVertex;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_10_genexpr) < 0) __PYX_ERR(1, 405, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_10_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_10_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_10_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_10_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_10_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_10_genexpr;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_11___init__) < 0) __PYX_ERR(1, 589, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_11___init__.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_11___init__.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_11___init__.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_11___init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_11___init__ = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_11___init__;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(1, 592, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_12_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_12_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_12_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_12_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_12_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_12_genexpr;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex) < 0) __PYX_ERR(1, 605, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_13_FindSourceVertex;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_14_genexpr) < 0) __PYX_ERR(1, 608, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_14_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_14_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_14_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_14_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_14_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_14_genexpr;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_15_LoadModel) < 0) __PYX_ERR(1, 806, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_15_LoadModel.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_15_LoadModel.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_15_LoadModel.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_15_LoadModel.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_15_LoadModel = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_15_LoadModel;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_16_genexpr) < 0) __PYX_ERR(1, 808, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_16_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_16_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_16_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_16_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_16_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_16_genexpr;
  if (PyType_Ready(&__pyx_type_16geodesic_chenhan___pyx_scope_struct_17_genexpr) < 0) __PYX_ERR(1, 809, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_16geodesic_chenhan___pyx_scope_struct_17_genexpr.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_16geodesic_chenhan___pyx_scope_struct_17_genexpr.tp_dictoffset && __pyx_type_16geodesic_chenhan___pyx_scope_struct_17_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_16geodesic_chenhan___pyx_scope_struct_17_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  __pyx_ptype_16geodesic_chenhan___pyx_scope_struct_17_genexpr = &__pyx_type_16geodesic_chenhan___pyx_scope_struct_17_genexpr;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initgeodesic_chenhan(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initgeodesic_chenhan(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_geodesic_chenhan(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_geodesic_chenhan(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_geodesic_chenhan(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'geodesic_chenhan' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_geodesic_chenhan(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("geodesic_chenhan", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_geodesic_chenhan) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "geodesic_chenhan")) {
      if (unlikely(PyDict_SetItemString(modules, "geodesic_chenhan", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  #endif

  /* "geodesic_chenhan.pyx":4
 * #cython: c_string_encoding=ascii
 * #cython: embedsignature=False
 * from  enum             import Enum as _PyEnum             # <<<<<<<<<<<<<<
 * from  libcpp.string   cimport string as libcpp_string
 * from  libcpp.string   cimport string as libcpp_utf8_string
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Enum);
  __Pyx_GIVEREF(__pyx_n_s_Enum);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Enum);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyEnum, __pyx_t_1) < 0) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "geodesic_chenhan.pyx":1
 * #Generated with autowrap 0.22.6 and Cython (Parser) 0.29.27             # <<<<<<<<<<<<<<
 * #cython: c_string_encoding=ascii
 * #cython: embedsignature=False
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "set.from_py":108
 * 
 * @cname("__pyx_convert_set_from_py_int")
 * cdef set[X] __pyx_convert_set_from_py_int(object o) except *:             # <<<<<<<<<<<<<<
 *     cdef set[X] s
 *     for item in o:
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init geodesic_chenhan", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init geodesic_chenhan");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyObjectFormatAndDecref */
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
    if (unlikely(!s)) return NULL;
    if (likely(PyUnicode_CheckExact(s))) return s;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyString_CheckExact(s))) {
        PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
        Py_DECREF(s);
        return result;
    }
    #endif
    return __Pyx_PyObject_FormatAndDecref(s, f);
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
    PyObject *result = PyObject_Format(s, f);
    Py_DECREF(s);
    return result;
}

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* set_iter */
static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
                                                  Py_ssize_t* p_orig_length, int* p_source_is_set) {
#if CYTHON_COMPILING_IN_CPYTHON
    is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable));
    *p_source_is_set = is_set;
    if (likely(is_set)) {
        *p_orig_length = PySet_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#else
    (void)is_set;
    *p_source_is_set = 0;
#endif
    *p_orig_length = 0;
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_set_iter_next(
        PyObject* iter_obj, Py_ssize_t orig_length,
        Py_ssize_t* ppos, PyObject **value,
        int source_is_set) {
    if (!CYTHON_COMPILING_IN_CPYTHON || unlikely(!source_is_set)) {
        *value = PyIter_Next(iter_obj);
        if (unlikely(!*value)) {
            return __Pyx_IterFinish();
        }
        (void)orig_length;
        (void)ppos;
        return 1;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) {
        PyErr_SetString(
            PyExc_RuntimeError,
            "set changed size during iteration");
        return -1;
    }
    {
        Py_hash_t hash;
        int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash);
        assert (ret != -1);
        if (likely(ret)) {
            Py_INCREF(*value);
            return 1;
        }
    }
#endif
    return 0;
}

/* bytes_index */
static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) {
    if (index < 0)
        index += PyBytes_GET_SIZE(bytes);
    if (check_bounds) {
        Py_ssize_t size = PyBytes_GET_SIZE(bytes);
        if (unlikely(!__Pyx_is_valid_index(index, size))) {
            PyErr_SetString(PyExc_IndexError, "string index out of range");
            return (char) -1;
        }
    }
    return PyBytes_AS_STRING(bytes)[index];
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            char val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(char) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(char) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(char),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* FetchCommonType */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (descr != NULL) {
        *method = descr;
        return 0;
    }
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(name));
#endif
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* CoroutineBase */
#include <structmember.h>
#include <frameobject.h>
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (!ev) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#if PY_VERSION_HEX >= 0x030300A0
        else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
        }
#endif
        else if (unlikely(PyTuple_Check(ev))) {
            if (PyTuple_GET_SIZE(ev) >= 1) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                value = PyTuple_GET_ITEM(ev, 0);
                Py_INCREF(value);
#else
                value = PySequence_ITEM(ev, 0);
#endif
            } else {
                Py_INCREF(Py_None);
                value = Py_None;
            }
            Py_DECREF(ev);
        }
        else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            value = ev;
        }
        if (likely(value)) {
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
    } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *t, *v, *tb;
    t = exc_state->exc_type;
    v = exc_state->exc_value;
    tb = exc_state->exc_traceback;
    exc_state->exc_type = NULL;
    exc_state->exc_value = NULL;
    exc_state->exc_traceback = NULL;
    Py_XDECREF(t);
    Py_XDECREF(v);
    Py_XDECREF(tb);
}
#define __Pyx_Coroutine_AlreadyRunningError(gen)  (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
        msg = "coroutine already executing";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
        msg = "async generator already executing";
    #endif
    } else {
        msg = "generator already executing";
    }
    PyErr_SetString(PyExc_ValueError, msg);
}
#define __Pyx_Coroutine_NotStartedError(gen)  (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
    const char *msg;
    if ((0)) {
    #ifdef __Pyx_Coroutine_USED
    } else if (__Pyx_Coroutine_Check(gen)) {
        msg = "can't send non-None value to a just-started coroutine";
    #endif
    #ifdef __Pyx_AsyncGen_USED
    } else if (__Pyx_AsyncGen_CheckExact(gen)) {
        msg = "can't send non-None value to a just-started async generator";
    #endif
    } else {
        msg = "can't send non-None value to a just-started generator";
    }
    PyErr_SetString(PyExc_TypeError, msg);
}
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing)  (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
    #ifdef __Pyx_Coroutine_USED
    if (!closing && __Pyx_Coroutine_Check(gen)) {
        PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
    } else
    #endif
    if (value) {
        #ifdef __Pyx_AsyncGen_USED
        if (__Pyx_AsyncGen_CheckExact(gen))
            PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
        else
        #endif
        PyErr_SetNone(PyExc_StopIteration);
    }
}
static
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
    __Pyx_PyThreadState_declare
    PyThreadState *tstate;
    __Pyx_ExcInfoStruct *exc_state;
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            return __Pyx_Coroutine_NotStartedError((PyObject*)self);
        }
    }
    if (unlikely(self->resume_label == -1)) {
        return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
    }
#if CYTHON_FAST_THREAD_STATE
    __Pyx_PyThreadState_assign
    tstate = __pyx_tstate;
#else
    tstate = __Pyx_PyThreadState_Current;
#endif
    exc_state = &self->gi_exc_state;
    if (exc_state->exc_type) {
        #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
        #else
        if (exc_state->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            assert(f->f_back == NULL);
            #if PY_VERSION_HEX >= 0x030B00A1
            f->f_back = PyThreadState_GetFrame(tstate);
            #else
            Py_XINCREF(tstate->frame);
            f->f_back = tstate->frame;
            #endif
        }
        #endif
    }
#if CYTHON_USE_EXC_INFO_STACK
    exc_state->previous_item = tstate->exc_info;
    tstate->exc_info = exc_state;
#else
    if (exc_state->exc_type) {
        __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(exc_state);
        __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
    }
#endif
    self->is_running = 1;
    retval = self->body((PyObject *) self, tstate, value);
    self->is_running = 0;
#if CYTHON_USE_EXC_INFO_STACK
    exc_state = &self->gi_exc_state;
    tstate->exc_info = exc_state->previous_item;
    exc_state->previous_item = NULL;
    __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
#endif
    return retval;
}
static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
    PyObject *exc_tb = exc_state->exc_traceback;
    if (likely(exc_tb)) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
#else
        PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
        PyFrameObject *f = tb->tb_frame;
        Py_CLEAR(f->f_back);
#endif
    }
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
    if (unlikely(!retval)) {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        if (!__Pyx_PyErr_Occurred()) {
            PyObject *exc = PyExc_StopIteration;
            #ifdef __Pyx_AsyncGen_USED
            if (__Pyx_AsyncGen_CheckExact(gen))
                exc = __Pyx_PyExc_StopAsyncIteration;
            #endif
            __Pyx_PyErr_SetNone(exc);
        }
    }
    return retval;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
static CYTHON_INLINE
PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
#if PY_VERSION_HEX <= 0x030A00A1
    return _PyGen_Send(gen, arg);
#else
    PyObject *result;
    if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
        if (PyAsyncGen_CheckExact(gen)) {
            assert(result == Py_None);
            PyErr_SetNone(PyExc_StopAsyncIteration);
        }
        else if (result == Py_None) {
            PyErr_SetNone(PyExc_StopIteration);
        }
        else {
            _PyGen_SetStopIterationValue(result);
        }
        Py_CLEAR(result);
    }
    return result;
#endif
}
#endif
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
    ret = __Pyx_Coroutine_SendEx(gen, val, 0);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_AsyncGen_USED
        if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
            ret = __Pyx_async_gen_asend_send(yf, value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyCoro_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value, 0);
    }
    return __Pyx_Coroutine_MethodReturn(self, retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_Check(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    if (__Pyx_CoroutineAwait_CheckExact(yf)) {
        retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
        retval = __Pyx_async_gen_asend_close(yf, NULL);
    } else
    if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
        retval = __Pyx_async_gen_athrow_close(yf, NULL);
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Next(yf);
        } else
        #endif
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
        if (PyGen_CheckExact(yf)) {
            ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_Check(yf)) {
            ret = __Pyx_Coroutine_Send(yf, Py_None);
        } else
        #endif
            ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
}
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
    return __Pyx_Coroutine_Close(self);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
    if (unlikely(retval)) {
        const char *msg;
        Py_DECREF(retval);
        if ((0)) {
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_Coroutine_Check(self)) {
            msg = "coroutine ignored GeneratorExit";
        #endif
        #ifdef __Pyx_AsyncGen_USED
        } else if (__Pyx_AsyncGen_CheckExact(self)) {
#if PY_VERSION_HEX < 0x03060000
            msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
#else
            msg = "async generator ignored GeneratorExit";
#endif
        #endif
        } else {
            msg = "generator ignored GeneratorExit";
        }
        PyErr_SetString(PyExc_RuntimeError, msg);
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
                                        PyObject *args, int close_on_genexit) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(gen->is_running))
        return __Pyx_Coroutine_AlreadyRunningError(gen);
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
            goto throw_here;
        }
        gen->is_running = 1;
        if (0
        #ifdef __Pyx_Generator_USED
            || __Pyx_Generator_CheckExact(yf)
        #endif
        #ifdef __Pyx_Coroutine_USED
            || __Pyx_Coroutine_Check(yf)
        #endif
            ) {
            ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
        #ifdef __Pyx_Coroutine_USED
        } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
            ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
        #endif
        } else {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            if (likely(args)) {
                ret = PyObject_CallObject(meth, args);
            } else {
                ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
            }
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(self, ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    PyObject *typ;
    PyObject *val = NULL;
    PyObject *tb = NULL;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
}
static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
    Py_VISIT(exc_state->exc_type);
    Py_VISIT(exc_state->exc_value);
    Py_VISIT(exc_state->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
    }
#endif
    Py_CLEAR(gen->gi_code);
    Py_CLEAR(gen->gi_frame);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    Py_CLEAR(gen->gi_modulename);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label >= 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (Py_REFCNT(self) > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        /* We have to handle this case for asynchronous generators
           right here, because this code has to be between UNTRACK
           and GC_Del. */
        Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
    }
#endif
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    __Pyx_PyThreadState_declare
    if (gen->resume_label < 0) {
        return;
    }
#if !CYTHON_USE_TP_FINALIZE
    assert(self->ob_refcnt == 0);
    __Pyx_SET_REFCNT(self, 1);
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
#ifdef __Pyx_AsyncGen_USED
    if (__Pyx_AsyncGen_CheckExact(self)) {
        __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
        PyObject *finalizer = agen->ag_finalizer;
        if (finalizer && !agen->ag_closed) {
            PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
            if (unlikely(!res)) {
                PyErr_WriteUnraisable(self);
            } else {
                Py_DECREF(res);
            }
            __Pyx_ErrRestore(error_type, error_value, error_traceback);
            return;
        }
    }
#endif
    if (unlikely(gen->resume_label == 0 && !error_value)) {
#ifdef __Pyx_Coroutine_USED
#ifdef __Pyx_Generator_USED
    if (!__Pyx_Generator_CheckExact(self))
#endif
        {
        PyObject_GC_UnTrack(self);
#if PY_MAJOR_VERSION >= 3  || defined(PyErr_WarnFormat)
        if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
            PyErr_WriteUnraisable(self);
#else
        {PyObject *msg;
        char *cmsg;
        #if CYTHON_COMPILING_IN_PYPY
        msg = NULL;
        cmsg = (char*) "coroutine was never awaited";
        #else
        char *cname;
        PyObject *qualname;
        qualname = gen->gi_qualname;
        cname = PyString_AS_STRING(qualname);
        msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
        if (unlikely(!msg)) {
            PyErr_Clear();
            cmsg = (char*) "coroutine was never awaited";
        } else {
            cmsg = PyString_AS_STRING(msg);
        }
        #endif
        if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
            PyErr_WriteUnraisable(self);
        Py_XDECREF(msg);}
#endif
        PyObject_GC_Track(self);
        }
#endif
    } else {
        PyObject *res = __Pyx_Coroutine_Close(self);
        if (unlikely(!res)) {
            if (PyErr_Occurred())
                PyErr_WriteUnraisable(self);
        } else {
            Py_DECREF(res);
        }
    }
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if !CYTHON_USE_TP_FINALIZE
    assert(Py_REFCNT(self) > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = Py_REFCNT(self);
        _Py_NewReference(self);
        __Pyx_SET_REFCNT(self, refcnt);
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(Py_TYPE(self)) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_name;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *name = self->gi_qualname;
    if (unlikely(!name)) name = Py_None;
    Py_INCREF(name);
    return name;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
{
    PyObject *frame = self->gi_frame;
    if (!frame) {
        if (unlikely(!self->gi_code)) {
            Py_RETURN_NONE;
        }
        frame = (PyObject *) PyFrame_New(
            PyThreadState_Get(),            /*PyThreadState *tstate,*/
            (PyCodeObject*) self->gi_code,  /*PyCodeObject *code,*/
            __pyx_d,                 /*PyObject *globals,*/
            0                               /*PyObject *locals*/
        );
        if (unlikely(!frame))
            return NULL;
        self->gi_frame = frame;
    }
    Py_INCREF(frame);
    return frame;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(
            PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (unlikely(!gen))
        return NULL;
    return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
}
static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
            __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
            PyObject *name, PyObject *qualname, PyObject *module_name) {
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->gi_exc_state.exc_type = NULL;
    gen->gi_exc_state.exc_value = NULL;
    gen->gi_exc_state.exc_traceback = NULL;
#if CYTHON_USE_EXC_INFO_STACK
    gen->gi_exc_state.previous_item = NULL;
#endif
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    Py_XINCREF(module_name);
    gen->gi_modulename = module_name;
    Py_XINCREF(code);
    gen->gi_code = code;
    gen->gi_frame = NULL;
    PyObject_GC_Track(gen);
    return gen;
}

/* PatchModuleWithCoroutine */
static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

/* PatchGeneratorABC */
#ifndef CYTHON_REGISTER_ABCS
#define CYTHON_REGISTER_ABCS 1
#endif
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (CYTHON_REGISTER_ABCS && !abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_MAJOR_VERSION >= 3) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

/* Generator */
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
     (char*) PyDoc_STR("Frame of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if CYTHON_USE_TP_FINALIZE
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if CYTHON_USE_TP_FINALIZE
    __Pyx_Coroutine_del,
#elif PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
