Commit a993433c authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Improve documentation of subgraph_isomorphism() and motifs()

parent 6fcf0f1b
......@@ -286,9 +286,9 @@ def extended_clustering(g, props=None, max_depth=3, undirected=False):
def motifs(g, k, p=1.0, motif_list=None, return_maps=False):
r"""
Count the occurrence of k-size subgraphs (motifs). A tuple with two lists is
returned: the list of motifs found, and the list with their respective
counts.
Count the occurrence of k-size node-induced subgraphs (motifs). A tuple with
two lists is returned: the list of motifs found, and the list with their
respective counts.
Parameters
----------
......@@ -358,6 +358,7 @@ def motifs(g, k, p=1.0, motif_list=None, return_maps=False):
motifs", IEEE/ACM Transactions on Computational Biology and
Bioinformatics (TCBB), Volume 3, Issue 4, Pages 347-359, 2006.
:doi:`10.1109/TCBB.2006.51`
.. [induced-subgraph-isomorphism] http://en.wikipedia.org/wiki/Induced_subgraph_isomorphism_problem
"""
sub_list = []
......
......@@ -222,6 +222,11 @@ def subgraph_isomorphism(sub, g, max_n=0, vertex_label=None, edge_label=None,
Notes
-----
Here "subgraph" does not mean "node-induced subgraph", i.e. there may exist
an edge in the matched subgraph in `g` that does not exist in `sub`. For
node-induced subgraph isomorphism, see the :func:`+graph_tool.clustering.motifs`
function.
The algorithm used is described in [ullmann-algorithm-1976]_. It has a
worse-case complexity of :math:`O(N_g^{N_{sub}})`, but for random graphs it
typically has a complexity of :math:`O(N_g^\gamma)` with :math:`\gamma`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment