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

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

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

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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


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


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


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


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


NONE_TYPE = _topylogic.NONE_TYPE

VERTEX_TYPE = _topylogic.VERTEX_TYPE

EDGE_TYPE = _topylogic.EDGE_TYPE

class stack_node(object):
    r"""Proxy of C stack_node struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    data = property(_topylogic.stack_node_data_get, _topylogic.stack_node_data_set, doc=r"""data""")
    next = property(_topylogic.stack_node_next_get, _topylogic.stack_node_next_set, doc=r"""next""")

    def __init__(self):
        r"""__init__(self) -> stack_node"""
        _topylogic.stack_node_swiginit(self, _topylogic.new_stack_node())
    __swig_destroy__ = _topylogic.delete_stack_node

# Register stack_node in _topylogic:
_topylogic.stack_node_swigregister(stack_node)

class stack(object):
    r"""Proxy of C stack struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    root = property(_topylogic.stack_root_get, _topylogic.stack_root_set, doc=r"""root""")
    length = property(_topylogic.stack_length_get, _topylogic.stack_length_set, doc=r"""length""")

    def __init__(self):
        r"""__init__(self) -> stack"""
        _topylogic.stack_swiginit(self, _topylogic.new_stack())
    __swig_destroy__ = _topylogic.delete_stack

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.stack_destroy(self)

    def get(self, index, dtype=NONE_TYPE):
        r"""
        get(self, index, dtype=NONE_TYPE) -> PyObject *

        Parameters
        ----------
        index: PyObject *
        dtype: enum enum TOPYLOGIC_TYPES

        """
        return _topylogic.stack_get(self, index, dtype)

    def pop(self, dtype=NONE_TYPE):
        r"""
        pop(self, dtype=NONE_TYPE) -> PyObject *

        Parameters
        ----------
        dtype: enum enum TOPYLOGIC_TYPES

        """
        return _topylogic.stack_pop(self, dtype)

    def push(self, data):
        r"""
        push(self, data) -> int

        Parameters
        ----------
        data: PyObject *

        """
        return _topylogic.stack_push(self, data)

    def to_list(self, dtype=NONE_TYPE):
        r"""
        to_list(self, dtype=NONE_TYPE) -> PyObject *

        Parameters
        ----------
        dtype: enum enum TOPYLOGIC_TYPES

        """
        return _topylogic.stack_to_list(self, dtype)

# Register stack in _topylogic:
_topylogic.stack_swigregister(stack)


def init_stack():
    r"""init_stack() -> stack"""
    return _topylogic.init_stack()

def get(stack, index):
    r"""
    get(stack, index) -> void *

    Parameters
    ----------
    stack: struct stack *
    index: int

    """
    return _topylogic.get(stack, index)

def pop(stack):
    r"""
    pop(stack) -> void *

    Parameters
    ----------
    stack: struct stack *

    """
    return _topylogic.pop(stack)

def push(stack, data):
    r"""
    push(stack, data) -> int

    Parameters
    ----------
    stack: struct stack *
    data: void *

    """
    return _topylogic.push(stack, data)

def destroy_stack(stack):
    r"""
    destroy_stack(stack)

    Parameters
    ----------
    stack: struct stack *

    """
    return _topylogic.destroy_stack(stack)
class AVLNode(object):
    r"""Proxy of C AVLNode struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    data = property(_topylogic.AVLNode_data_get, _topylogic.AVLNode_data_set, doc=r"""data""")
    id = property(_topylogic.AVLNode_id_get, _topylogic.AVLNode_id_set, doc=r"""id""")
    height = property(_topylogic.AVLNode_height_get, _topylogic.AVLNode_height_set, doc=r"""height""")
    left = property(_topylogic.AVLNode_left_get, _topylogic.AVLNode_left_set, doc=r"""left""")
    right = property(_topylogic.AVLNode_right_get, _topylogic.AVLNode_right_set, doc=r"""right""")

    def __init__(self):
        r"""__init__(self) -> AVLNode"""
        _topylogic.AVLNode_swiginit(self, _topylogic.new_AVLNode())
    __swig_destroy__ = _topylogic.delete_AVLNode

# Register AVLNode in _topylogic:
_topylogic.AVLNode_swigregister(AVLNode)

class AVLTree(object):
    r"""Proxy of C AVLTree struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    root = property(_topylogic.AVLTree_root_get, _topylogic.AVLTree_root_set, doc=r"""root""")
    size = property(_topylogic.AVLTree_size_get, _topylogic.AVLTree_size_set, doc=r"""size""")

    def __init__(self):
        r"""__init__(self) -> AVLTree"""
        _topylogic.AVLTree_swiginit(self, _topylogic.new_AVLTree())
    __swig_destroy__ = _topylogic.delete_AVLTree

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.AVLTree_destroy(self)

    def insert(self, data, id):
        r"""
        insert(self, data, id) -> int

        Parameters
        ----------
        data: PyObject *
        id: PyObject *

        """
        return _topylogic.AVLTree_insert(self, data, id)

    def remove_ID(self, id, dtype=NONE_TYPE):
        r"""
        remove_ID(self, id, dtype=NONE_TYPE) -> PyObject *

        Parameters
        ----------
        id: PyObject *
        dtype: enum enum TOPYLOGIC_TYPES

        """
        return _topylogic.AVLTree_remove_ID(self, id, dtype)

    def find(self, id, dtype=NONE_TYPE):
        r"""
        find(self, id, dtype=NONE_TYPE) -> PyObject *

        Parameters
        ----------
        id: PyObject *
        dtype: enum enum TOPYLOGIC_TYPES

        """
        return _topylogic.AVLTree_find(self, id, dtype)

    def inorder(self, dtype=NONE_TYPE):
        r"""
        inorder(self, dtype=NONE_TYPE) -> PyObject *

        Parameters
        ----------
        dtype: enum enum TOPYLOGIC_TYPES

        """
        return _topylogic.AVLTree_inorder(self, dtype)

    def preorder(self, dtype=NONE_TYPE):
        r"""
        preorder(self, dtype=NONE_TYPE) -> PyObject *

        Parameters
        ----------
        dtype: enum enum TOPYLOGIC_TYPES

        """
        return _topylogic.AVLTree_preorder(self, dtype)

    def postorder(self, dtype=NONE_TYPE):
        r"""
        postorder(self, dtype=NONE_TYPE) -> PyObject *

        Parameters
        ----------
        dtype: enum enum TOPYLOGIC_TYPES

        """
        return _topylogic.AVLTree_postorder(self, dtype)

    def stackify(self):
        r"""stackify(self) -> PyObject *"""
        return _topylogic.AVLTree_stackify(self)

# Register AVLTree in _topylogic:
_topylogic.AVLTree_swigregister(AVLTree)


def init_avl():
    r"""init_avl() -> AVLTree"""
    return _topylogic.init_avl()

def insert(tree, data, id):
    r"""
    insert(tree, data, id) -> int

    Parameters
    ----------
    tree: struct AVLTree *
    data: void *
    id: int

    """
    return _topylogic.insert(tree, data, id)

def remove_ID(tree, id):
    r"""
    remove_ID(tree, id) -> void *

    Parameters
    ----------
    tree: struct AVLTree *
    id: int

    """
    return _topylogic.remove_ID(tree, id)

def find(tree, id):
    r"""
    find(tree, id) -> void *

    Parameters
    ----------
    tree: struct AVLTree *
    id: int

    """
    return _topylogic.find(tree, id)

def inorder(tree, stack):
    r"""
    inorder(tree, stack)

    Parameters
    ----------
    tree: struct AVLTree *
    stack: struct stack *

    """
    return _topylogic.inorder(tree, stack)

def postorder(tree, stack):
    r"""
    postorder(tree, stack)

    Parameters
    ----------
    tree: struct AVLTree *
    stack: struct stack *

    """
    return _topylogic.postorder(tree, stack)

def preorder(tree, stack):
    r"""
    preorder(tree, stack)

    Parameters
    ----------
    tree: struct AVLTree *
    stack: struct stack *

    """
    return _topylogic.preorder(tree, stack)

def stackify(tree, stack):
    r"""
    stackify(tree, stack)

    Parameters
    ----------
    tree: struct AVLTree *
    stack: struct stack *

    """
    return _topylogic.stackify(tree, stack)

def destroy_avl(tree):
    r"""
    destroy_avl(tree)

    Parameters
    ----------
    tree: struct AVLTree *

    """
    return _topylogic.destroy_avl(tree)
ABORT = _topylogic.ABORT

WAIT = _topylogic.WAIT

CONTINUE = _topylogic.CONTINUE

MAX_ATTEMPTS = _topylogic.MAX_ATTEMPTS

THREAD_ATTEMPT_SLEEP = _topylogic.THREAD_ATTEMPT_SLEEP

PRINT = _topylogic.PRINT

RED = _topylogic.RED

BLACK = _topylogic.BLACK

TERMINATE = _topylogic.TERMINATE

NO_SNAP = _topylogic.NO_SNAP

START_STOP = _topylogic.START_STOP

NO_VERB = _topylogic.NO_VERB

VERTICES = _topylogic.VERTICES

EDGES = _topylogic.EDGES

FUNCTIONS = _topylogic.FUNCTIONS

GLOBALS = _topylogic.GLOBALS

class graph(object):
    r"""Proxy of C graph struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    context = property(_topylogic.graph_context_get, _topylogic.graph_context_set, doc=r"""context""")
    mem_option = property(_topylogic.graph_mem_option_get, _topylogic.graph_mem_option_set, doc=r"""mem_option""")
    request_flag = property(_topylogic.graph_request_flag_get, _topylogic.graph_request_flag_set, doc=r"""request_flag""")
    vertices = property(_topylogic.graph_vertices_get, _topylogic.graph_vertices_set, doc=r"""vertices""")
    start = property(_topylogic.graph_start_get, _topylogic.graph_start_set, doc=r"""start""")
    modify = property(_topylogic.graph_modify_get, _topylogic.graph_modify_set, doc=r"""modify""")
    remove_edges = property(_topylogic.graph_remove_edges_get, _topylogic.graph_remove_edges_set, doc=r"""remove_edges""")
    remove_vertices = property(_topylogic.graph_remove_vertices_get, _topylogic.graph_remove_vertices_set, doc=r"""remove_vertices""")
    max_state_changes = property(_topylogic.graph_max_state_changes_get, _topylogic.graph_max_state_changes_set, doc=r"""max_state_changes""")
    max_loop = property(_topylogic.graph_max_loop_get, _topylogic.graph_max_loop_set, doc=r"""max_loop""")
    snapshot_timestamp = property(_topylogic.graph_snapshot_timestamp_get, _topylogic.graph_snapshot_timestamp_set, doc=r"""snapshot_timestamp""")
    lvl_verbose = property(_topylogic.graph_lvl_verbose_get, _topylogic.graph_lvl_verbose_set, doc=r"""lvl_verbose""")
    state_count = property(_topylogic.graph_state_count_get, _topylogic.graph_state_count_set, doc=r"""state_count""")
    lock = property(_topylogic.graph_lock_get, _topylogic.graph_lock_set, doc=r"""lock""")
    color_lock = property(_topylogic.graph_color_lock_get, _topylogic.graph_color_lock_set, doc=r"""color_lock""")
    state = property(_topylogic.graph_state_get, _topylogic.graph_state_set, doc=r"""state""")
    previous_color = property(_topylogic.graph_previous_color_get, _topylogic.graph_previous_color_set, doc=r"""previous_color""")
    print_flag = property(_topylogic.graph_print_flag_get, _topylogic.graph_print_flag_set, doc=r"""print_flag""")
    red_vertex_count = property(_topylogic.graph_red_vertex_count_get, _topylogic.graph_red_vertex_count_set, doc=r"""red_vertex_count""")
    black_vertex_count = property(_topylogic.graph_black_vertex_count_get, _topylogic.graph_black_vertex_count_set, doc=r"""black_vertex_count""")
    pause = property(_topylogic.graph_pause_get, _topylogic.graph_pause_set, doc=r"""pause""")
    red_locked = property(_topylogic.graph_red_locked_get, _topylogic.graph_red_locked_set, doc=r"""red_locked""")
    black_locked = property(_topylogic.graph_black_locked_get, _topylogic.graph_black_locked_set, doc=r"""black_locked""")
    num_vertices = property(_topylogic.graph_num_vertices_get, _topylogic.graph_num_vertices_set, doc=r"""num_vertices""")
    pause_cond = property(_topylogic.graph_pause_cond_get, _topylogic.graph_pause_cond_set, doc=r"""pause_cond""")
    red_fire = property(_topylogic.graph_red_fire_get, _topylogic.graph_red_fire_set, doc=r"""red_fire""")
    black_fire = property(_topylogic.graph_black_fire_get, _topylogic.graph_black_fire_set, doc=r"""black_fire""")
    copy_module = property(_topylogic.graph_copy_module_get, _topylogic.graph_copy_module_set, doc=r"""copy_module""")
    copy_dict = property(_topylogic.graph_copy_dict_get, _topylogic.graph_copy_dict_set, doc=r"""copy_dict""")
    copy_obj = property(_topylogic.graph_copy_obj_get, _topylogic.graph_copy_obj_set, doc=r"""copy_obj""")

    def __init__(self, *args, **kwargs):
        r"""
        __init__(self, max_state_changes=-1, snapshot_timestamp=START_STOP, max_loop=MAX_LOOPS, lvl_verbose=VERTICES|EDGES|FUNCTIONS|GLOBALS, context=SINGLE, mem_option=CONTINUE, request_flag=IGNORE_FAIL_REQUEST) -> graph

        Parameters
        ----------
        max_state_changes: int
        snapshot_timestamp: unsigned int
        max_loop: unsigned int
        lvl_verbose: enum enum VERBOSITY
        context: enum enum CONTEXT
        mem_option: enum enum MEM_OPTION
        request_flag: enum enum REQUEST_FLAG

        """
        _topylogic.graph_swiginit(self, _topylogic.new_graph(*args, **kwargs))
    __swig_destroy__ = _topylogic.delete_graph

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.graph_destroy(self)

    def set_starting_ids(self, id):
        r"""
        set_starting_ids(self, id) -> int

        Parameters
        ----------
        id: PyObject *

        """
        return _topylogic.graph_set_starting_ids(self, id)

    def run(self, init_vertex_args):
        r"""
        run(self, init_vertex_args) -> int

        Parameters
        ----------
        init_vertex_args: struct vertex_result **

        """
        return _topylogic.graph_run(self, init_vertex_args)

    def pause_graph(self):
        r"""pause_graph(self) -> int"""
        return _topylogic.graph_pause_graph(self)

    def resume_graph(self):
        r"""resume_graph(self) -> int"""
        return _topylogic.graph_resume_graph(self)

    def submit_request(self, request_type, request):
        r"""
        submit_request(self, request_type, request) -> int

        Parameters
        ----------
        request_type: enum enum REQUESTS
        request: void *

        """
        return _topylogic.graph_submit_request(self, request_type, request)

    def submit_generic_request(self, arg, f):
        r"""
        submit_generic_request(self, arg, f) -> int

        Parameters
        ----------
        arg: PyObject *
        f: PyObject *

        """
        return _topylogic.graph_submit_generic_request(self, arg, f)

    def process_requests(self):
        r"""process_requests(self) -> int"""
        return _topylogic.graph_process_requests(self)

# Register graph in _topylogic:
_topylogic.graph_swigregister(graph)

class vertex_result(object):
    r"""Proxy of C vertex_result struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    vertex_argv = property(_topylogic.vertex_result_vertex_argv_get, _topylogic.vertex_result_vertex_argv_set, doc=r"""vertex_argv""")
    vertex_size = property(_topylogic.vertex_result_vertex_size_get, _topylogic.vertex_result_vertex_size_set, doc=r"""vertex_size""")
    edge_argv = property(_topylogic.vertex_result_edge_argv_get, _topylogic.vertex_result_edge_argv_set, doc=r"""edge_argv""")
    edge_size = property(_topylogic.vertex_result_edge_size_get, _topylogic.vertex_result_edge_size_set, doc=r"""edge_size""")

    def __init__(self, vertex_argv=None, edge_argv=None):
        r"""
        __init__(self, vertex_argv=None, edge_argv=None) -> vertex_result

        Parameters
        ----------
        vertex_argv: PyObject *
        edge_argv: PyObject *

        """
        _topylogic.vertex_result_swiginit(self, _topylogic.new_vertex_result(vertex_argv, edge_argv))
    __swig_destroy__ = _topylogic.delete_vertex_result

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.vertex_result_destroy(self)

    def set_vertex_argv(self, vertex_argv):
        r"""
        set_vertex_argv(self, vertex_argv)

        Parameters
        ----------
        vertex_argv: PyObject *

        """
        return _topylogic.vertex_result_set_vertex_argv(self, vertex_argv)

    def set_edge_argv(self, edge_argv):
        r"""
        set_edge_argv(self, edge_argv)

        Parameters
        ----------
        edge_argv: PyObject *

        """
        return _topylogic.vertex_result_set_edge_argv(self, edge_argv)

    def get_vertex_argv(self):
        r"""get_vertex_argv(self) -> PyObject *"""
        return _topylogic.vertex_result_get_vertex_argv(self)

    def get_edge_argv(self):
        r"""get_edge_argv(self) -> PyObject *"""
        return _topylogic.vertex_result_get_edge_argv(self)

# Register vertex_result in _topylogic:
_topylogic.vertex_result_swigregister(vertex_result)

class shared_edge(object):
    r"""Proxy of C shared_edge struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    vertex_data = property(_topylogic.shared_edge_vertex_data_get, _topylogic.shared_edge_vertex_data_set, doc=r"""vertex_data""")
    edge_data = property(_topylogic.shared_edge_edge_data_get, _topylogic.shared_edge_edge_data_set, doc=r"""edge_data""")

    def __init__(self):
        r"""__init__(self) -> shared_edge"""
        _topylogic.shared_edge_swiginit(self, _topylogic.new_shared_edge())
    __swig_destroy__ = _topylogic.delete_shared_edge

# Register shared_edge in _topylogic:
_topylogic.shared_edge_swigregister(shared_edge)

class vertex(object):
    r"""Proxy of C vertex struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    id = property(_topylogic.vertex_id_get, _topylogic.vertex_id_set, doc=r"""id""")
    is_active = property(_topylogic.vertex_is_active_get, _topylogic.vertex_is_active_set, doc=r"""is_active""")
    f = property(_topylogic.vertex_f_get, _topylogic.vertex_f_set, doc=r"""f""")
    glbl = property(_topylogic.vertex_glbl_get, _topylogic.vertex_glbl_set, doc=r"""glbl""")
    shared = property(_topylogic.vertex_shared_get, _topylogic.vertex_shared_set, doc=r"""shared""")
    lock = property(_topylogic.vertex_lock_get, _topylogic.vertex_lock_set, doc=r"""lock""")
    edge_tree = property(_topylogic.vertex_edge_tree_get, _topylogic.vertex_edge_tree_set, doc=r"""edge_tree""")
    joining_vertices = property(_topylogic.vertex_joining_vertices_get, _topylogic.vertex_joining_vertices_set, doc=r"""joining_vertices""")
    context = property(_topylogic.vertex_context_get, _topylogic.vertex_context_set, doc=r"""context""")
    graph = property(_topylogic.vertex_graph_get, _topylogic.vertex_graph_set, doc=r"""graph""")

    def __init__(self, graph, f, id, glbl=None):
        r"""
        __init__(self, graph, f, id, glbl=None) -> vertex

        Parameters
        ----------
        graph: struct graph *
        f: PyObject *
        id: int
        glbl: PyObject *

        """
        _topylogic.vertex_swiginit(self, _topylogic.new_vertex(graph, f, id, glbl))
    __swig_destroy__ = _topylogic.delete_vertex

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.vertex_destroy(self)

    def modify_vertex(self, f, glbl):
        r"""
        modify_vertex(self, f, glbl) -> int

        Parameters
        ----------
        f: PyObject *
        glbl: PyObject *

        """
        return _topylogic.vertex_modify_vertex(self, f, glbl)

    def modify_f(self, f):
        r"""
        modify_f(self, f) -> int

        Parameters
        ----------
        f: PyObject *

        """
        return _topylogic.vertex_modify_f(self, f)

    def modify_glbl(self, glbl):
        r"""
        modify_glbl(self, glbl) -> int

        Parameters
        ----------
        glbl: PyObject *

        """
        return _topylogic.vertex_modify_glbl(self, glbl)

    def modify_shared_edge_vars(self, edge_vars):
        r"""
        modify_shared_edge_vars(self, edge_vars) -> int

        Parameters
        ----------
        edge_vars: PyObject *

        """
        return _topylogic.vertex_modify_shared_edge_vars(self, edge_vars)

# Register vertex in _topylogic:
_topylogic.vertex_swigregister(vertex)

class vertex_request(object):
    r"""Proxy of C vertex_request struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    graph = property(_topylogic.vertex_request_graph_get, _topylogic.vertex_request_graph_set, doc=r"""graph""")
    id = property(_topylogic.vertex_request_id_get, _topylogic.vertex_request_id_set, doc=r"""id""")
    f = property(_topylogic.vertex_request_f_get, _topylogic.vertex_request_f_set, doc=r"""f""")
    glbl = property(_topylogic.vertex_request_glbl_get, _topylogic.vertex_request_glbl_set, doc=r"""glbl""")

    def __init__(self, graph, id, f=None, glbl=None):
        r"""
        __init__(self, graph, id, f=None, glbl=None) -> vertex_request

        Parameters
        ----------
        graph: struct graph *
        id: int
        f: PyObject *
        glbl: PyObject *

        """
        _topylogic.vertex_request_swiginit(self, _topylogic.new_vertex_request(graph, id, f, glbl))
    __swig_destroy__ = _topylogic.delete_vertex_request

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.vertex_request_destroy(self)

# Register vertex_request in _topylogic:
_topylogic.vertex_request_swigregister(vertex_request)

class mod_vertex_request(object):
    r"""Proxy of C mod_vertex_request struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    vertex = property(_topylogic.mod_vertex_request_vertex_get, _topylogic.mod_vertex_request_vertex_set, doc=r"""vertex""")
    f = property(_topylogic.mod_vertex_request_f_get, _topylogic.mod_vertex_request_f_set, doc=r"""f""")
    glbl = property(_topylogic.mod_vertex_request_glbl_get, _topylogic.mod_vertex_request_glbl_set, doc=r"""glbl""")

    def __init__(self, vertex, f=None, glbl=None):
        r"""
        __init__(self, vertex, f=None, glbl=None) -> mod_vertex_request

        Parameters
        ----------
        vertex: struct vertex *
        f: PyObject *
        glbl: PyObject *

        """
        _topylogic.mod_vertex_request_swiginit(self, _topylogic.new_mod_vertex_request(vertex, f, glbl))
    __swig_destroy__ = _topylogic.delete_mod_vertex_request

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.mod_vertex_request_destroy(self)

# Register mod_vertex_request in _topylogic:
_topylogic.mod_vertex_request_swigregister(mod_vertex_request)

class mod_edge_vars_request(object):
    r"""Proxy of C mod_edge_vars_request struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    vertex = property(_topylogic.mod_edge_vars_request_vertex_get, _topylogic.mod_edge_vars_request_vertex_set, doc=r"""vertex""")
    edge_vars = property(_topylogic.mod_edge_vars_request_edge_vars_get, _topylogic.mod_edge_vars_request_edge_vars_set, doc=r"""edge_vars""")

    def __init__(self, vertex, edge_vars=None):
        r"""
        __init__(self, vertex, edge_vars=None) -> mod_edge_vars_request

        Parameters
        ----------
        vertex: struct vertex *
        edge_vars: PyObject *

        """
        _topylogic.mod_edge_vars_request_swiginit(self, _topylogic.new_mod_edge_vars_request(vertex, edge_vars))
    __swig_destroy__ = _topylogic.delete_mod_edge_vars_request

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.mod_edge_vars_request_destroy(self)

# Register mod_edge_vars_request in _topylogic:
_topylogic.mod_edge_vars_request_swigregister(mod_edge_vars_request)

class destroy_vertex_request(object):
    r"""Proxy of C destroy_vertex_request struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    graph = property(_topylogic.destroy_vertex_request_graph_get, _topylogic.destroy_vertex_request_graph_set, doc=r"""graph""")
    vertex = property(_topylogic.destroy_vertex_request_vertex_get, _topylogic.destroy_vertex_request_vertex_set, doc=r"""vertex""")

    def __init__(self, graph, vertex):
        r"""
        __init__(self, graph, vertex) -> destroy_vertex_request

        Parameters
        ----------
        graph: struct graph *
        vertex: struct vertex *

        """
        _topylogic.destroy_vertex_request_swiginit(self, _topylogic.new_destroy_vertex_request(graph, vertex))
    __swig_destroy__ = _topylogic.delete_destroy_vertex_request

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.destroy_vertex_request_destroy(self)

# Register destroy_vertex_request in _topylogic:
_topylogic.destroy_vertex_request_swigregister(destroy_vertex_request)

class destroy_vertex_id_request(object):
    r"""Proxy of C destroy_vertex_id_request struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    graph = property(_topylogic.destroy_vertex_id_request_graph_get, _topylogic.destroy_vertex_id_request_graph_set, doc=r"""graph""")
    id = property(_topylogic.destroy_vertex_id_request_id_get, _topylogic.destroy_vertex_id_request_id_set, doc=r"""id""")

    def __init__(self, graph, id):
        r"""
        __init__(self, graph, id) -> destroy_vertex_id_request

        Parameters
        ----------
        graph: struct graph *
        id: int

        """
        _topylogic.destroy_vertex_id_request_swiginit(self, _topylogic.new_destroy_vertex_id_request(graph, id))
    __swig_destroy__ = _topylogic.delete_destroy_vertex_id_request

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.destroy_vertex_id_request_destroy(self)

# Register destroy_vertex_id_request in _topylogic:
_topylogic.destroy_vertex_id_request_swigregister(destroy_vertex_id_request)

EDGE = _topylogic.EDGE

BI_EDGE = _topylogic.BI_EDGE

SELF_EDGE = _topylogic.SELF_EDGE

class edge(object):
    r"""Proxy of C edge struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    id = property(_topylogic.edge_id_get, _topylogic.edge_id_set, doc=r"""id""")
    f = property(_topylogic.edge_f_get, _topylogic.edge_f_set, doc=r"""f""")
    glbl = property(_topylogic.edge_glbl_get, _topylogic.edge_glbl_set, doc=r"""glbl""")
    a_vars = property(_topylogic.edge_a_vars_get, _topylogic.edge_a_vars_set, doc=r"""a_vars""")
    b_vars = property(_topylogic.edge_b_vars_get, _topylogic.edge_b_vars_set, doc=r"""b_vars""")
    a = property(_topylogic.edge_a_get, _topylogic.edge_a_set, doc=r"""a""")
    b = property(_topylogic.edge_b_get, _topylogic.edge_b_set, doc=r"""b""")
    edge_type = property(_topylogic.edge_edge_type_get, _topylogic.edge_edge_type_set, doc=r"""edge_type""")
    bi_edge = property(_topylogic.edge_bi_edge_get, _topylogic.edge_bi_edge_set, doc=r"""bi_edge""")
    bi_edge_lock = property(_topylogic.edge_bi_edge_lock_get, _topylogic.edge_bi_edge_lock_set, doc=r"""bi_edge_lock""")

    def __init__(self, a, b, f, glbl=None):
        r"""
        __init__(self, a, b, f, glbl=None) -> edge

        Parameters
        ----------
        a: struct vertex *
        b: struct vertex *
        f: PyObject *
        glbl: PyObject *

        """
        _topylogic.edge_swiginit(self, _topylogic.new_edge(a, b, f, glbl))
    __swig_destroy__ = _topylogic.delete_edge

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.edge_destroy(self)

    def modify_edge(self, f=None, glbl=None):
        r"""
        modify_edge(self, f=None, glbl=None) -> int

        Parameters
        ----------
        f: PyObject *
        glbl: PyObject *

        """
        return _topylogic.edge_modify_edge(self, f, glbl)

    def set_f(self, f):
        r"""
        set_f(self, f) -> int

        Parameters
        ----------
        f: PyObject *

        """
        return _topylogic.edge_set_f(self, f)

    def set_glbl(self, glbl=None):
        r"""
        set_glbl(self, glbl=None) -> int

        Parameters
        ----------
        glbl: PyObject *

        """
        return _topylogic.edge_set_glbl(self, glbl)

# Register edge in _topylogic:
_topylogic.edge_swigregister(edge)

class edge_request(object):
    r"""Proxy of C edge_request struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    a = property(_topylogic.edge_request_a_get, _topylogic.edge_request_a_set, doc=r"""a""")
    b = property(_topylogic.edge_request_b_get, _topylogic.edge_request_b_set, doc=r"""b""")
    f = property(_topylogic.edge_request_f_get, _topylogic.edge_request_f_set, doc=r"""f""")
    glbl = property(_topylogic.edge_request_glbl_get, _topylogic.edge_request_glbl_set, doc=r"""glbl""")

    def __init__(self, a, b, f=None, glbl=None):
        r"""
        __init__(self, a, b, f=None, glbl=None) -> edge_request

        Parameters
        ----------
        a: struct vertex *
        b: struct vertex *
        f: PyObject *
        glbl: PyObject *

        """
        _topylogic.edge_request_swiginit(self, _topylogic.new_edge_request(a, b, f, glbl))
    __swig_destroy__ = _topylogic.delete_edge_request

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.edge_request_destroy(self)

# Register edge_request in _topylogic:
_topylogic.edge_request_swigregister(edge_request)

class destroy_edge_request(object):
    r"""Proxy of C destroy_edge_request struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    a = property(_topylogic.destroy_edge_request_a_get, _topylogic.destroy_edge_request_a_set, doc=r"""a""")
    b = property(_topylogic.destroy_edge_request_b_get, _topylogic.destroy_edge_request_b_set, doc=r"""b""")

    def __init__(self, a, b):
        r"""
        __init__(self, a, b) -> destroy_edge_request

        Parameters
        ----------
        a: struct vertex *
        b: struct vertex *

        """
        _topylogic.destroy_edge_request_swiginit(self, _topylogic.new_destroy_edge_request(a, b))
    __swig_destroy__ = _topylogic.delete_destroy_edge_request

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.destroy_edge_request_destroy(self)

# Register destroy_edge_request in _topylogic:
_topylogic.destroy_edge_request_swigregister(destroy_edge_request)

class destroy_edge_id_request(object):
    r"""Proxy of C destroy_edge_id_request struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    a = property(_topylogic.destroy_edge_id_request_a_get, _topylogic.destroy_edge_id_request_a_set, doc=r"""a""")
    id = property(_topylogic.destroy_edge_id_request_id_get, _topylogic.destroy_edge_id_request_id_set, doc=r"""id""")

    def __init__(self, a, id):
        r"""
        __init__(self, a, id) -> destroy_edge_id_request

        Parameters
        ----------
        a: struct vertex *
        id: int

        """
        _topylogic.destroy_edge_id_request_swiginit(self, _topylogic.new_destroy_edge_id_request(a, id))
    __swig_destroy__ = _topylogic.delete_destroy_edge_id_request

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.destroy_edge_id_request_destroy(self)

# Register destroy_edge_id_request in _topylogic:
_topylogic.destroy_edge_id_request_swigregister(destroy_edge_id_request)

NONE = _topylogic.NONE

NONE_UNSAFE = _topylogic.NONE_UNSAFE

SINGLE = _topylogic.SINGLE

SWITCH = _topylogic.SWITCH

SWITCH_UNSAFE = _topylogic.SWITCH_UNSAFE

CREAT_VERTEX = _topylogic.CREAT_VERTEX

CREAT_EDGE = _topylogic.CREAT_EDGE

CREAT_BI_EDGE = _topylogic.CREAT_BI_EDGE

MOD_VERTEX = _topylogic.MOD_VERTEX

MOD_EDGE_VARS = _topylogic.MOD_EDGE_VARS

MOD_EDGE = _topylogic.MOD_EDGE

MOD_BI_EDGE = _topylogic.MOD_BI_EDGE

DESTROY_VERTEX = _topylogic.DESTROY_VERTEX

DESTROY_VERTEX_BY_ID = _topylogic.DESTROY_VERTEX_BY_ID

DESTROY_EDGE = _topylogic.DESTROY_EDGE

DESTROY_BI_EDGE = _topylogic.DESTROY_BI_EDGE

DESTROY_EDGE_BY_ID = _topylogic.DESTROY_EDGE_BY_ID

GENERIC = _topylogic.GENERIC

NO_FAIL_REQUEST = _topylogic.NO_FAIL_REQUEST

IGNORE_FAIL_REQUEST = _topylogic.IGNORE_FAIL_REQUEST

class request(object):
    r"""Proxy of C request struct."""

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

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    request = property(_topylogic.request_request_get, _topylogic.request_request_set, doc=r"""request""")
    f = property(_topylogic.request_f_get, _topylogic.request_f_set, doc=r"""f""")
    args = property(_topylogic.request_args_get, _topylogic.request_args_set, doc=r"""args""")
    __swig_destroy__ = _topylogic.delete_request

# Register request in _topylogic:
_topylogic.request_swigregister(request)

class bi_edge(object):
    r"""Proxy of C bi_edge struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    edge_a_to_b = property(_topylogic.bi_edge_edge_a_to_b_get, _topylogic.bi_edge_edge_a_to_b_set, doc=r"""edge_a_to_b""")
    edge_b_to_a = property(_topylogic.bi_edge_edge_b_to_a_get, _topylogic.bi_edge_edge_b_to_a_set, doc=r"""edge_b_to_a""")

    def __init__(self, a, b, f, glbl=None):
        r"""
        __init__(self, a, b, f, glbl=None) -> bi_edge

        Parameters
        ----------
        a: struct vertex *
        b: struct vertex *
        f: PyObject *
        glbl: PyObject *

        """
        _topylogic.bi_edge_swiginit(self, _topylogic.new_bi_edge(a, b, f, glbl))
    __swig_destroy__ = _topylogic.delete_bi_edge

    def destroy(self):
        r"""destroy(self)"""
        return _topylogic.bi_edge_destroy(self)

    def modify_bi_edge(self, f=None, glbl=None):
        r"""
        modify_bi_edge(self, f=None, glbl=None) -> int

        Parameters
        ----------
        f: PyObject *
        glbl: PyObject *

        """
        return _topylogic.bi_edge_modify_bi_edge(self, f, glbl)

    def set_f(self, f):
        r"""
        set_f(self, f) -> int

        Parameters
        ----------
        f: PyObject *

        """
        return _topylogic.bi_edge_set_f(self, f)

    def set_glbl(self, glbl=None):
        r"""
        set_glbl(self, glbl=None) -> int

        Parameters
        ----------
        glbl: PyObject *

        """
        return _topylogic.bi_edge_set_glbl(self, glbl)

# Register bi_edge in _topylogic:
_topylogic.bi_edge_swigregister(bi_edge)

class glbl_args(object):
    r"""Proxy of C glbl_args struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    glbl = property(_topylogic.glbl_args_glbl_get, _topylogic.glbl_args_glbl_set, doc=r"""glbl""")
    py_callback = property(_topylogic.glbl_args_py_callback_get, _topylogic.glbl_args_py_callback_set, doc=r"""py_callback""")

    def __init__(self):
        r"""__init__(self) -> glbl_args"""
        _topylogic.glbl_args_swiginit(self, _topylogic.new_glbl_args())
    __swig_destroy__ = _topylogic.delete_glbl_args

# Register glbl_args in _topylogic:
_topylogic.glbl_args_swigregister(glbl_args)

class edge_vars(object):
    r"""Proxy of C edge_vars struct."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    vars = property(_topylogic.edge_vars_vars_get, _topylogic.edge_vars_vars_set, doc=r"""vars""")

    def __init__(self):
        r"""__init__(self) -> edge_vars"""
        _topylogic.edge_vars_swiginit(self, _topylogic.new_edge_vars())
    __swig_destroy__ = _topylogic.delete_edge_vars

# Register edge_vars in _topylogic:
_topylogic.edge_vars_swigregister(edge_vars)


def edge_f(id, args, glbl, edge_vars_a, edge_vars_b):
    r"""
    edge_f(id, args, glbl, edge_vars_a, edge_vars_b) -> int

    Parameters
    ----------
    id: int
    args: void *
    glbl: void *
    edge_vars_a: void const *const
    edge_vars_b: void const *const

    """
    return _topylogic.edge_f(id, args, glbl, edge_vars_a, edge_vars_b)

def vertex_f(id, graph, args, glbl, edge_vars):
    r"""
    vertex_f(id, graph, args, glbl, edge_vars)

    Parameters
    ----------
    id: int
    graph: struct graph *
    args: struct vertex_result *
    glbl: void *
    edge_vars: void *

    """
    return _topylogic.vertex_f(id, graph, args, glbl, edge_vars)

def generic_f(glbl):
    r"""
    generic_f(glbl)

    Parameters
    ----------
    glbl: void *

    """
    return _topylogic.generic_f(glbl)


