Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > e16b1fb69a3f2ddbb03f004e9641ad33 > files > 1110

python-networkx-doc-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>Adjacency List &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="Reading and writing graphs" href="readwrite.html" />
    <link rel="next" title="read_adjlist" href="generated/networkx.readwrite.adjlist.read_adjlist.html" />
    <link rel="prev" title="Reading and writing graphs" href="readwrite.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.readwrite.adjlist.read_adjlist.html" title="read_adjlist"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="readwrite.html" title="Reading and writing graphs"
             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="readwrite.html" accesskey="U">Reading and writing graphs</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="#">Adjacency List</a><ul>
<li><a class="reference internal" href="#format">Format</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="readwrite.html"
                        title="previous chapter">Reading and writing graphs</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="generated/networkx.readwrite.adjlist.read_adjlist.html"
                        title="next chapter">read_adjlist</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.readwrite.adjlist">
<span id="adjacency-list"></span><h1>Adjacency List<a class="headerlink" href="#module-networkx.readwrite.adjlist" title="Permalink to this headline">¶</a></h1>
<p>Read and write NetworkX graphs as adjacency lists.</p>
<p>Adjacency list format is useful for graphs without data associated
with nodes or edges and for nodes that can be meaningfully represented
as strings.</p>
<div class="section" id="format">
<h2>Format<a class="headerlink" href="#format" title="Permalink to this headline">¶</a></h2>
<p>The adjacency list format consists of lines with node labels.  The
first label in a line is the source node.  Further labels in the line
are considered target nodes and are added to the graph along with an edge
between the source node and target node.</p>
<p>The graph with edges a-b, a-c, d-e can be represented as the following
adjacency list (anything following the # in a line is a comment):</p>
<div class="highlight-python"><pre>a b c # source target target
d e</pre>
</div>
</div>
<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.readwrite.adjlist.read_adjlist.html#networkx.readwrite.adjlist.read_adjlist" title="networkx.readwrite.adjlist.read_adjlist"><tt class="xref py py-obj docutils literal"><span class="pre">read_adjlist</span></tt></a>(path[,&nbsp;comments,&nbsp;delimiter,&nbsp;...])</td>
<td>Read graph in adjacency list format from path.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.readwrite.adjlist.write_adjlist.html#networkx.readwrite.adjlist.write_adjlist" title="networkx.readwrite.adjlist.write_adjlist"><tt class="xref py py-obj docutils literal"><span class="pre">write_adjlist</span></tt></a>(G,&nbsp;path[,&nbsp;comments,&nbsp;...])</td>
<td>Write graph G in single-line adjacency-list format to path.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="generated/networkx.readwrite.adjlist.parse_adjlist.html#networkx.readwrite.adjlist.parse_adjlist" title="networkx.readwrite.adjlist.parse_adjlist"><tt class="xref py py-obj docutils literal"><span class="pre">parse_adjlist</span></tt></a>(lines[,&nbsp;comments,&nbsp;delimiter,&nbsp;...])</td>
<td>Parse lines of a graph adjacency list representation.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="generated/networkx.readwrite.adjlist.generate_adjlist.html#networkx.readwrite.adjlist.generate_adjlist" title="networkx.readwrite.adjlist.generate_adjlist"><tt class="xref py py-obj docutils literal"><span class="pre">generate_adjlist</span></tt></a>(G[,&nbsp;delimiter])</td>
<td>Generate a single line of the graph G in adjacency list format.</td>
</tr>
</tbody>
</table>
</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.readwrite.adjlist.read_adjlist.html" title="read_adjlist"
             >next</a> |</li>
        <li class="right" >
          <a href="readwrite.html" title="Reading and writing graphs"
             >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="readwrite.html" >Reading and writing graphs</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>