Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > e5ddaa4c8aef3b801d60a051db101461 > files > 1354

python-networkx-1.8.1-3.mga4.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Bipartite &mdash; NetworkX 1.8.1 documentation</title>
    
    <link rel="stylesheet" href="../_static/networkx.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.8.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within NetworkX 1.8.1 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="top" title="NetworkX 1.8.1 documentation" href="../index.html" />
    <link rel="up" title="Algorithms" href="algorithms.html" />
    <link rel="next" title="is_bipartite" href="generated/networkx.algorithms.bipartite.basic.is_bipartite.html" />
    <link rel="prev" title="attribute_mixing_dict" href="generated/networkx.algorithms.assortativity.attribute_mixing_dict.html" /> 
  </head>
  <body>
<div style="color: black;background-color: white; font-size: 3.2em; text-align: left; padding: 15px 10px 10px 15px">
NetworkX
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="generated/networkx.algorithms.bipartite.basic.is_bipartite.html" title="is_bipartite"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="generated/networkx.algorithms.assortativity.attribute_mixing_dict.html" title="attribute_mixing_dict"
             accesskey="P">previous</a> |</li>
        <li><a href="http://networkx.github.com/">NetworkX Home </a> |&nbsp;</li>
        <li><a href="http://networkx.github.com/documentation.html">Documentation </a>|&nbsp;</li>
        <li><a href="http://networkx.github.com/download.html">Download </a> |&nbsp;</li>
        <li><a href="http://github.com/networkx">Developer (Github)</a></li>



          <li><a href="index.html" >Reference</a> &raquo;</li>
          <li><a href="pdf_reference.html" >Reference</a> &raquo;</li>
          <li><a href="algorithms.html" accesskey="U">Algorithms</a> &raquo;</li> 
      </ul>
    </div>



      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Bipartite</a><ul>
<li><a class="reference internal" href="#module-networkx.algorithms.bipartite.basic">Basic functions</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#module-networkx.algorithms.bipartite.projection">Projections</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#module-networkx.algorithms.bipartite.spectral">Spectral</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#module-networkx.algorithms.bipartite.cluster">Clustering</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#module-networkx.algorithms.bipartite.redundancy">Redundancy</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#module-networkx.algorithms.bipartite.centrality">Centrality</a><ul>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="generated/networkx.algorithms.assortativity.attribute_mixing_dict.html"
                        title="previous chapter">attribute_mixing_dict</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="generated/networkx.algorithms.bipartite.basic.is_bipartite.html"
                        title="next chapter">is_bipartite</a></p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-networkx.algorithms.bipartite">
<span id="bipartite"></span><h1>Bipartite<a class="headerlink" href="#module-networkx.algorithms.bipartite" title="Permalink to this headline">¶</a></h1>
<p>This module provides functions and operations for bipartite
graphs.  Bipartite graphs <span class="math">B = (U, V, E)</span> have two node sets <span class="math">U,V</span> and edges in
<span class="math">E</span> that only connect nodes from opposite sets. It is common in the literature
to use an spatial analogy referring to the two node sets as top and bottom nodes.</p>
<p>The bipartite algorithms are not imported into the networkx namespace
at the top level so the easiest way to use them is with:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">networkx</span> <span class="kn">as</span> <span class="nn">nx</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">networkx.algorithms</span> <span class="kn">import</span> <span class="n">bipartite</span>
</pre></div>
</div>
<p>NetworkX does not have a custom bipartite graph class but the Graph()
or DiGraph() classes can be used to represent bipartite graphs. However,
you have to keep track of which set each node belongs to, and make
sure that there is no edge between nodes of the same set. The convention used
in NetworkX is to use a node attribute named &#8220;bipartite&#8221; with values 0 or 1 to
identify the sets each node belongs to.</p>
<p>For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">nx</span><span class="o">.</span><span class="n">Graph</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span><span class="o">.</span><span class="n">add_nodes_from</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">],</span> <span class="n">bipartite</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> <span class="c"># Add the node attribute &quot;bipartite&quot;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span><span class="o">.</span><span class="n">add_nodes_from</span><span class="p">([</span><span class="s">&#39;a&#39;</span><span class="p">,</span><span class="s">&#39;b&#39;</span><span class="p">,</span><span class="s">&#39;c&#39;</span><span class="p">],</span> <span class="n">bipartite</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span><span class="o">.</span><span class="n">add_edges_from</span><span class="p">([(</span><span class="mi">1</span><span class="p">,</span><span class="s">&#39;a&#39;</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="s">&#39;b&#39;</span><span class="p">),</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="s">&#39;b&#39;</span><span class="p">),</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="s">&#39;c&#39;</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="s">&#39;c&#39;</span><span class="p">),</span> <span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="s">&#39;a&#39;</span><span class="p">)])</span>
</pre></div>
</div>
<p>Many algorithms of the bipartite module of NetworkX require, as an argument, a
container with all the nodes that belong to one set, in addition to the bipartite
graph <span class="math">B</span>. If <span class="math">B</span> is connected, you can find the node sets using a two-coloring 
algorithm:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">nx</span><span class="o">.</span><span class="n">is_connected</span><span class="p">(</span><span class="n">B</span><span class="p">)</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">bottom_nodes</span><span class="p">,</span> <span class="n">top_nodes</span> <span class="o">=</span> <span class="n">bipartite</span><span class="o">.</span><span class="n">sets</span><span class="p">(</span><span class="n">B</span><span class="p">)</span>
</pre></div>
</div>
<p>list(top_nodes)
[1, 2, 3, 4]
list(bottom_nodes)
[&#8216;a&#8217;, &#8216;c&#8217;, &#8216;b&#8217;]</p>
<p>However, if the input graph is not connected, there are more than one possible
colorations. Thus, the following result is correct:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">B</span><span class="o">.</span><span class="n">remove_edge</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="s">&#39;c&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">nx</span><span class="o">.</span><span class="n">is_connected</span><span class="p">(</span><span class="n">B</span><span class="p">)</span>
<span class="go">False</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">bottom_nodes</span><span class="p">,</span> <span class="n">top_nodes</span> <span class="o">=</span> <span class="n">bipartite</span><span class="o">.</span><span class="n">sets</span><span class="p">(</span><span class="n">B</span><span class="p">)</span>
</pre></div>
</div>
<p>list(top_nodes)
[1, 2, 4, &#8216;c&#8217;]
list(bottom_nodes)
[&#8216;a&#8217;, 3, &#8216;b&#8217;]</p>
<p>Using the &#8220;bipartite&#8221; node attribute, you can easily get the two node sets:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">top_nodes</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">n</span> <span class="k">for</span> <span class="n">n</span><span class="p">,</span><span class="n">d</span> <span class="ow">in</span> <span class="n">B</span><span class="o">.</span><span class="n">nodes</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="k">if</span> <span class="n">d</span><span class="p">[</span><span class="s">&#39;bipartite&#39;</span><span class="p">]</span><span class="o">==</span><span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">bottom_nodes</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">B</span><span class="p">)</span> <span class="o">-</span> <span class="n">top_nodes</span>
</pre></div>
</div>
<p>list(top_nodes)
[1, 2, 3, 4]
list(bottom_nodes)
[&#8216;a&#8217;, &#8216;c&#8217;, &#8216;b&#8217;]</p>
<p>So you can easily use the bipartite algorithms that require, as an argument, a
container with all nodes that belong to one node set:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span><span class="p">(</span><span class="nb">round</span><span class="p">(</span><span class="n">bipartite</span><span class="o">.</span><span class="n">density</span><span class="p">(</span><span class="n">B</span><span class="p">,</span> <span class="n">bottom_nodes</span><span class="p">),</span><span class="mi">2</span><span class="p">))</span>
<span class="go">0.42</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">G</span> <span class="o">=</span> <span class="n">bipartite</span><span class="o">.</span><span class="n">projected_graph</span><span class="p">(</span><span class="n">B</span><span class="p">,</span> <span class="n">top_nodes</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">G</span><span class="o">.</span><span class="n">edges</span><span class="p">()</span>
<span class="go">[(1, 2), (1, 4)]</span>
</pre></div>
</div>
<p>All bipartite graph generators in NetworkX build bipartite graphs with the 
&#8220;bipartite&#8221; node attribute. Thus, you can use the same approach:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">RB</span> <span class="o">=</span> <span class="n">nx</span><span class="o">.</span><span class="n">bipartite_random_graph</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mf">0.2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">RB_top</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">n</span> <span class="k">for</span> <span class="n">n</span><span class="p">,</span><span class="n">d</span> <span class="ow">in</span> <span class="n">RB</span><span class="o">.</span><span class="n">nodes</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> <span class="k">if</span> <span class="n">d</span><span class="p">[</span><span class="s">&#39;bipartite&#39;</span><span class="p">]</span><span class="o">==</span><span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">RB_bottom</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">RB</span><span class="p">)</span> <span class="o">-</span> <span class="n">RB_top</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">list</span><span class="p">(</span><span class="n">RB_top</span><span class="p">)</span>
<span class="go">[0, 1, 2, 3, 4]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">list</span><span class="p">(</span><span class="n">RB_bottom</span><span class="p">)</span>
<span class="go">[5, 6, 7, 8, 9, 10, 11]</span>
</pre></div>
</div>
<p>For other bipartite graph generators see the bipartite section of
<a class="reference internal" href="generators.html"><em>Graph generators</em></a>.</p>
<div class="section" id="module-networkx.algorithms.bipartite.basic">
<span id="basic-functions"></span><h2>Basic functions<a class="headerlink" href="#module-networkx.algorithms.bipartite.basic" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.basic.is_bipartite.html#networkx.algorithms.bipartite.basic.is_bipartite" title="networkx.algorithms.bipartite.basic.is_bipartite"><tt class="xref py py-obj docutils literal"><span class="pre">is_bipartite</span></tt></a>(G)</td>
<td>Returns True if graph G is bipartite, False if not.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.basic.is_bipartite_node_set.html#networkx.algorithms.bipartite.basic.is_bipartite_node_set" title="networkx.algorithms.bipartite.basic.is_bipartite_node_set"><tt class="xref py py-obj docutils literal"><span class="pre">is_bipartite_node_set</span></tt></a>(G,&nbsp;nodes)</td>
<td>Returns True if nodes and G/nodes are a bipartition of G.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.basic.sets.html#networkx.algorithms.bipartite.basic.sets" title="networkx.algorithms.bipartite.basic.sets"><tt class="xref py py-obj docutils literal"><span class="pre">sets</span></tt></a>(G)</td>
<td>Returns bipartite node sets of graph G.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.basic.color.html#networkx.algorithms.bipartite.basic.color" title="networkx.algorithms.bipartite.basic.color"><tt class="xref py py-obj docutils literal"><span class="pre">color</span></tt></a>(G)</td>
<td>Returns a two-coloring of the graph.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.basic.density.html#networkx.algorithms.bipartite.basic.density" title="networkx.algorithms.bipartite.basic.density"><tt class="xref py py-obj docutils literal"><span class="pre">density</span></tt></a>(B,&nbsp;nodes)</td>
<td>Return density of bipartite graph B.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.basic.degrees.html#networkx.algorithms.bipartite.basic.degrees" title="networkx.algorithms.bipartite.basic.degrees"><tt class="xref py py-obj docutils literal"><span class="pre">degrees</span></tt></a>(B,&nbsp;nodes[,&nbsp;weight])</td>
<td>Return the degrees of the two node sets in the bipartite graph B.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.basic.biadjacency_matrix.html#networkx.algorithms.bipartite.basic.biadjacency_matrix" title="networkx.algorithms.bipartite.basic.biadjacency_matrix"><tt class="xref py py-obj docutils literal"><span class="pre">biadjacency_matrix</span></tt></a>(G,&nbsp;row_order[,&nbsp;...])</td>
<td>Return the biadjacency matrix of the bipartite graph G.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="module-networkx.algorithms.bipartite.projection">
<span id="projections"></span><h2>Projections<a class="headerlink" href="#module-networkx.algorithms.bipartite.projection" title="Permalink to this headline">¶</a></h2>
<p>One-mode (unipartite) projections of bipartite graphs.</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.projection.projected_graph.html#networkx.algorithms.bipartite.projection.projected_graph" title="networkx.algorithms.bipartite.projection.projected_graph"><tt class="xref py py-obj docutils literal"><span class="pre">projected_graph</span></tt></a>(B,&nbsp;nodes[,&nbsp;multigraph])</td>
<td>Returns the projection of B onto one of its node sets.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.projection.weighted_projected_graph.html#networkx.algorithms.bipartite.projection.weighted_projected_graph" title="networkx.algorithms.bipartite.projection.weighted_projected_graph"><tt class="xref py py-obj docutils literal"><span class="pre">weighted_projected_graph</span></tt></a>(B,&nbsp;nodes[,&nbsp;ratio])</td>
<td>Returns a weighted projection of B onto one of its node sets.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.projection.collaboration_weighted_projected_graph.html#networkx.algorithms.bipartite.projection.collaboration_weighted_projected_graph" title="networkx.algorithms.bipartite.projection.collaboration_weighted_projected_graph"><tt class="xref py py-obj docutils literal"><span class="pre">collaboration_weighted_projected_graph</span></tt></a>(B,&nbsp;nodes)</td>
<td>Newman&#8217;s weighted projection of B onto one of its node sets.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.projection.overlap_weighted_projected_graph.html#networkx.algorithms.bipartite.projection.overlap_weighted_projected_graph" title="networkx.algorithms.bipartite.projection.overlap_weighted_projected_graph"><tt class="xref py py-obj docutils literal"><span class="pre">overlap_weighted_projected_graph</span></tt></a>(B,&nbsp;nodes[,&nbsp;...])</td>
<td>Overlap weighted projection of B onto one of its node sets.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.projection.generic_weighted_projected_graph.html#networkx.algorithms.bipartite.projection.generic_weighted_projected_graph" title="networkx.algorithms.bipartite.projection.generic_weighted_projected_graph"><tt class="xref py py-obj docutils literal"><span class="pre">generic_weighted_projected_graph</span></tt></a>(B,&nbsp;nodes[,&nbsp;...])</td>
<td>Weighted projection of B with a user-specified weight function.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="module-networkx.algorithms.bipartite.spectral">
<span id="spectral"></span><h2>Spectral<a class="headerlink" href="#module-networkx.algorithms.bipartite.spectral" title="Permalink to this headline">¶</a></h2>
<p>Spectral bipartivity measure.</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.spectral.spectral_bipartivity.html#networkx.algorithms.bipartite.spectral.spectral_bipartivity" title="networkx.algorithms.bipartite.spectral.spectral_bipartivity"><tt class="xref py py-obj docutils literal"><span class="pre">spectral_bipartivity</span></tt></a>(G[,&nbsp;nodes,&nbsp;weight])</td>
<td>Returns the spectral bipartivity.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="module-networkx.algorithms.bipartite.cluster">
<span id="clustering"></span><h2>Clustering<a class="headerlink" href="#module-networkx.algorithms.bipartite.cluster" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.cluster.clustering.html#networkx.algorithms.bipartite.cluster.clustering" title="networkx.algorithms.bipartite.cluster.clustering"><tt class="xref py py-obj docutils literal"><span class="pre">clustering</span></tt></a>(G[,&nbsp;nodes,&nbsp;mode])</td>
<td>Compute a bipartite clustering coefficient for nodes.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.cluster.average_clustering.html#networkx.algorithms.bipartite.cluster.average_clustering" title="networkx.algorithms.bipartite.cluster.average_clustering"><tt class="xref py py-obj docutils literal"><span class="pre">average_clustering</span></tt></a>(G[,&nbsp;nodes,&nbsp;mode])</td>
<td>Compute the average bipartite clustering coefficient.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.cluster.latapy_clustering.html#networkx.algorithms.bipartite.cluster.latapy_clustering" title="networkx.algorithms.bipartite.cluster.latapy_clustering"><tt class="xref py py-obj docutils literal"><span class="pre">latapy_clustering</span></tt></a>(G[,&nbsp;nodes,&nbsp;mode])</td>
<td>Compute a bipartite clustering coefficient for nodes.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.cluster.robins_alexander_clustering.html#networkx.algorithms.bipartite.cluster.robins_alexander_clustering" title="networkx.algorithms.bipartite.cluster.robins_alexander_clustering"><tt class="xref py py-obj docutils literal"><span class="pre">robins_alexander_clustering</span></tt></a>(G)</td>
<td>Compute the bipartite clustering of G.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="module-networkx.algorithms.bipartite.redundancy">
<span id="redundancy"></span><h2>Redundancy<a class="headerlink" href="#module-networkx.algorithms.bipartite.redundancy" title="Permalink to this headline">¶</a></h2>
<p>Node redundancy for bipartite graphs.</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.redundancy.node_redundancy.html#networkx.algorithms.bipartite.redundancy.node_redundancy" title="networkx.algorithms.bipartite.redundancy.node_redundancy"><tt class="xref py py-obj docutils literal"><span class="pre">node_redundancy</span></tt></a>(G[,&nbsp;nodes])</td>
<td>Compute bipartite node redundancy coefficient.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="module-networkx.algorithms.bipartite.centrality">
<span id="centrality"></span><h2>Centrality<a class="headerlink" href="#module-networkx.algorithms.bipartite.centrality" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.centrality.closeness_centrality.html#networkx.algorithms.bipartite.centrality.closeness_centrality" title="networkx.algorithms.bipartite.centrality.closeness_centrality"><tt class="xref py py-obj docutils literal"><span class="pre">closeness_centrality</span></tt></a>(G,&nbsp;nodes[,&nbsp;normalized])</td>
<td>Compute the closeness centrality for nodes in a bipartite network.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.centrality.degree_centrality.html#networkx.algorithms.bipartite.centrality.degree_centrality" title="networkx.algorithms.bipartite.centrality.degree_centrality"><tt class="xref py py-obj docutils literal"><span class="pre">degree_centrality</span></tt></a>(G,&nbsp;nodes)</td>
<td>Compute the degree centrality for nodes in a bipartite network.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.algorithms.bipartite.centrality.betweenness_centrality.html#networkx.algorithms.bipartite.centrality.betweenness_centrality" title="networkx.algorithms.bipartite.centrality.betweenness_centrality"><tt class="xref py py-obj docutils literal"><span class="pre">betweenness_centrality</span></tt></a>(G,&nbsp;nodes)</td>
<td>Compute betweenness centrality for nodes in a bipartite network.</td>
</tr>
</tbody>
</table>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="generated/networkx.algorithms.bipartite.basic.is_bipartite.html" title="is_bipartite"
             >next</a> |</li>
        <li class="right" >
          <a href="generated/networkx.algorithms.assortativity.attribute_mixing_dict.html" title="attribute_mixing_dict"
             >previous</a> |</li>
        <li><a href="http://networkx.github.com/">NetworkX Home </a> |&nbsp;</li>
        <li><a href="http://networkx.github.com/documentation.html">Documentation </a>|&nbsp;</li>
        <li><a href="http://networkx.github.com/download.html">Download </a> |&nbsp;</li>
        <li><a href="http://github.com/networkx">Developer (Github)</a></li>



          <li><a href="index.html" >Reference</a> &raquo;</li>
          <li><a href="pdf_reference.html" >Reference</a> &raquo;</li>
          <li><a href="algorithms.html" >Algorithms</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2013, NetworkX Developers.
      Last updated on Oct 23, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>