<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Structure Zoo &mdash; structify_net 2 documentation</title>
      <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
      <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
      <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  <!--[if lt IE 9]>
    <script src="_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script src="_static/jquery.js"></script>
        <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/sphinx_highlight.js"></script>
    <script src="_static/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="structify_net.zoo.sort_ER" href="generated/structify_net.zoo.sort_ER.html" />
    <link rel="prev" title="Classes" href="Classes.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="index.html" class="icon icon-home">
            structify_net
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Welcome to Structify_net’s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorial/Tutorial.html">Introduction to Structify_Net</a></li>
<li class="toctree-l1"><a class="reference internal" href="Classes.html">Classes</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Structure Zoo</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#individual-models">Individual models</a><ul>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_ER.html">structify_net.zoo.sort_ER</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_distances.html">structify_net.zoo.sort_distances</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_blocks_assortative.html">structify_net.zoo.sort_blocks_assortative</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_overlap_communities.html">structify_net.zoo.sort_overlap_communities</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_largest_disconnected_cliques.html">structify_net.zoo.sort_largest_disconnected_cliques</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_stars.html">structify_net.zoo.sort_stars</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_core_distance.html">structify_net.zoo.sort_core_distance</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_spatial_WS.html">structify_net.zoo.sort_spatial_WS</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_fractal_leaves.html">structify_net.zoo.sort_fractal_leaves</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_fractal_root.html">structify_net.zoo.sort_fractal_root</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_nestedness.html">structify_net.zoo.sort_nestedness</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_fractal_hierarchical.html">structify_net.zoo.sort_fractal_hierarchical</a></li>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.sort_fractal_star.html">structify_net.zoo.sort_fractal_star</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#function-to-get-instanciated-model-collections">function to get instanciated model collections</a><ul>
<li class="toctree-l3"><a class="reference internal" href="generated/structify_net.zoo.get_all_rank_models.html">structify_net.zoo.get_all_rank_models</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Visualization.html">Visualization</a></li>
<li class="toctree-l1"><a class="reference internal" href="Scoring.html">Scoring</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">structify_net</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">Structure Zoo</li>
      <li class="wy-breadcrumbs-aside">
            <a href="_sources/Zoo.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="structure-zoo">
<h1>Structure Zoo<a class="headerlink" href="#structure-zoo" title="Permalink to this heading"></a></h1>
<p>The structure zoo is a collection of structures. It contains both classic ones such as bloc structures, spatial structures or Watts-Strogatz structures, and less common ones. The zoo is a good place to start if you want to learn about the different types of structures that can be created with the library.</p>
<p>The zoo collection of structures is in the  <code class="xref py py-mod docutils literal notranslate"><span class="pre">zoo</span></code> submodule.</p>
<p>Example of usage:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">structify_net.zoo</span>
<span class="n">rank_model</span> <span class="o">=</span> <span class="n">zoo</span><span class="o">.</span><span class="n">sort_nestedness</span><span class="p">(</span><span class="n">nodes</span><span class="o">=</span><span class="mi">100</span><span class="p">)</span>
<span class="n">g</span> <span class="o">=</span> <span class="n">rank_model</span><span class="o">.</span><span class="n">generate_graph</span><span class="p">(</span><span class="n">epsilon</span><span class="o">=</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">m</span><span class="o">=</span><span class="mi">1000</span><span class="p">)</span>
</pre></div>
</div>
<p>There are some useful shortcuts to get collection of structures from the</p>
<ul class="simple">
<li><p><code class="xref py py-data docutils literal notranslate"><span class="pre">zoo.all_models_no_param</span></code>: contains all the model functions that do not require any parameter.</p></li>
<li><p><code class="xref py py-data docutils literal notranslate"><span class="pre">zoo.all_models_with_m</span></code>: returns all the model functions that require a parameter <cite>m</cite> (Expected number of edges).</p></li>
<li><p><code class="xref py py-data docutils literal notranslate"><span class="pre">zoo.all_models</span></code>: returns all the models functions</p></li>
</ul>
<p>The function <a class="reference internal" href="generated/structify_net.zoo.get_all_rank_models.html#structify_net.zoo.get_all_rank_models" title="structify_net.zoo.get_all_rank_models"><code class="xref py py-func docutils literal notranslate"><span class="pre">zoo.get_all_rank_models()</span></code></a> return instanciated models. See details below.</p>
<section id="individual-models">
<h2>Individual models<a class="headerlink" href="#individual-models" title="Permalink to this heading"></a></h2>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_ER.html#structify_net.zoo.sort_ER" title="structify_net.zoo.sort_ER"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_ER</span></code></a>(nodes)</p></td>
<td><p>Erdos-Renyi rank model</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_distances.html#structify_net.zoo.sort_distances" title="structify_net.zoo.sort_distances"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_distances</span></code></a>(nodes[, dimensions, distance])</p></td>
<td><p>Rank model based on the distance between nodes</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_blocks_assortative.html#structify_net.zoo.sort_blocks_assortative" title="structify_net.zoo.sort_blocks_assortative"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_blocks_assortative</span></code></a>(nodes[, blocks])</p></td>
<td><p>Rank model based on assortative blocks</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_overlap_communities.html#structify_net.zoo.sort_overlap_communities" title="structify_net.zoo.sort_overlap_communities"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_overlap_communities</span></code></a>(nodes[, blocks])</p></td>
<td><p>Rank model based on overlapping communities</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_largest_disconnected_cliques.html#structify_net.zoo.sort_largest_disconnected_cliques" title="structify_net.zoo.sort_largest_disconnected_cliques"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_largest_disconnected_cliques</span></code></a>(nodes, m)</p></td>
<td><p>A rank model based on the largest disconnected cliques</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_stars.html#structify_net.zoo.sort_stars" title="structify_net.zoo.sort_stars"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_stars</span></code></a>(nodes)</p></td>
<td><p>A rank model based on a star structure</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_core_distance.html#structify_net.zoo.sort_core_distance" title="structify_net.zoo.sort_core_distance"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_core_distance</span></code></a>(nodes[, dimensions, ...])</p></td>
<td><p>Rank model based on the sum of the distance of their nodes to the center of the space.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_spatial_WS.html#structify_net.zoo.sort_spatial_WS" title="structify_net.zoo.sort_spatial_WS"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_spatial_WS</span></code></a>(nodes[, k])</p></td>
<td><p>Rank model based on a spatial Watts-Strogatz model</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_fractal_leaves.html#structify_net.zoo.sort_fractal_leaves" title="structify_net.zoo.sort_fractal_leaves"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_fractal_leaves</span></code></a>(nodes[, d])</p></td>
<td><p>A rank model based on a fractal structure</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_fractal_root.html#structify_net.zoo.sort_fractal_root" title="structify_net.zoo.sort_fractal_root"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_fractal_root</span></code></a>(nodes[, d])</p></td>
<td><p>A rank model based on a fractal structure</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_nestedness.html#structify_net.zoo.sort_nestedness" title="structify_net.zoo.sort_nestedness"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_nestedness</span></code></a>(nodes)</p></td>
<td><p>Rank model based on nestedness</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_fractal_hierarchical.html#structify_net.zoo.sort_fractal_hierarchical" title="structify_net.zoo.sort_fractal_hierarchical"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_fractal_hierarchical</span></code></a>(nodes[, d])</p></td>
<td><p>Rank model based on a fractal structure</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/structify_net.zoo.sort_fractal_star.html#structify_net.zoo.sort_fractal_star" title="structify_net.zoo.sort_fractal_star"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.sort_fractal_star</span></code></a>(nodes[, d])</p></td>
<td><p>A rank model based on a fractal structure</p></td>
</tr>
</tbody>
</table>
</section>
<section id="function-to-get-instanciated-model-collections">
<h2>function to get instanciated model collections<a class="headerlink" href="#function-to-get-instanciated-model-collections" title="Permalink to this heading"></a></h2>
<blockquote>
<div><table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/structify_net.zoo.get_all_rank_models.html#structify_net.zoo.get_all_rank_models" title="structify_net.zoo.get_all_rank_models"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zoo.get_all_rank_models</span></code></a>(n, m)</p></td>
<td><p>Returns a dictionary of all rank models</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</section>
</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="Classes.html" class="btn btn-neutral float-left" title="Classes" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="generated/structify_net.zoo.sort_ER.html" class="btn btn-neutral float-right" title="structify_net.zoo.sort_ER" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2023, Rémy Cazabet.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>