.. _f-graphdistance: module ``graph.graph_distance`` =============================== .. inheritance-diagram:: mlstatpy.graph.graph_distance Short summary +++++++++++++ module ``mlstatpy.graph.graph_distance`` First approach for a edit distance between two graphs. See :ref:`l-graph_distance`. :githublink:`%|py|8` Classes +++++++ +----------------------------------------------------------------------+-----------------------------------------------------------+ | class | truncated documentation | +======================================================================+===========================================================+ | :class:`_Edge ` | | +----------------------------------------------------------------------+-----------------------------------------------------------+ | :class:`_Vertex ` | | +----------------------------------------------------------------------+-----------------------------------------------------------+ | :class:`Edge ` | Defines an edge of a graph. | +----------------------------------------------------------------------+-----------------------------------------------------------+ | :class:`GraphDistance ` | Defines a graph to compute a distance between two graphs. | +----------------------------------------------------------------------+-----------------------------------------------------------+ | :class:`Vertex ` | Defines a vertex of a graph. | +----------------------------------------------------------------------+-----------------------------------------------------------+ Properties ++++++++++ +------------------------------------------------------------+-------------------------+ | property | truncated documentation | +============================================================+=========================+ | :meth:`Label ` | returns the label | +------------------------------------------------------------+-------------------------+ | :meth:`Label ` | returns the label | +------------------------------------------------------------+-------------------------+ Static Methods ++++++++++++++ +-------------------------------------------------------------------------------------------------+---------------------------+ | staticmethod | truncated documentation | +=================================================================================================+===========================+ | :meth:`get_list_of_vertices ` | | +-------------------------------------------------------------------------------------------------+---------------------------+ | :meth:`load_from_file ` | loads a graph from a file | +-------------------------------------------------------------------------------------------------+---------------------------+ Methods +++++++ +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | method | truncated documentation | +======================================================================================================================+=========================================================================+ | :py:meth:`__getitem__ ` | returns a vertex or an edge if no vertex with the given index was found | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__init__ ` | constructor | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__init__ ` | constructor | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__str__ ` | usual | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__str__ ` | usual | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`__str__ ` | usual | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`_private__init__ ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :py:meth:`_private_string_path_matching ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`clean_dead_ends ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`common_paths ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`compute_predecessor ` | usual | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`compute_successor ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`connect_root_and_leave ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`distance_matching_graphs_paths ` | Computes an alignment between two graphs. | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`draw_vertices_edges ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`edit_distance_path ` | Tries to align two paths from two graphs. | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`enumerate_all_paths ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`get_matching_functions ` | returns default matching functions between two vertices and two edges | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`get_order_vertices ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`is_edge ` | returns True | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`is_edge ` | returns False | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`is_vertex ` | returns False | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`is_vertex ` | returns True | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`private_count_left_right ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`private_kruskal_matrix ` | | +----------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlstatpy.graph.graph_distance :members: :special-members: __init__ :show-inheritance: