summaryrefslogtreecommitdiff
path: root/networkx/classes/digraph.py
Commit message (Collapse)AuthorAgeFilesLines
* "Warning" is not a numpydoc sectionAric Hagberg2015-06-131-4/+2
|
* Expand data keyword in G.edges and add default dataDan Schult2015-01-171-10/+23
| | | | | | | | | | | | | | | When data=True, the whole data dictionary is returned for each edge. When data=False, no data is returned. Otherwise data is used as the attribute name of the edge data to return. >>> [ (u,v,edata['weight']) for u,v,edata in G.edges(data=True) ] becomes >>> G.edges(data='weight') >>> for n,nbrs in G.adjacency_iter(): ... for nbr,ddict in nbrs.items(): ... print (n,nbr,ddict.get('weight',1)) becomes >>> G.edges(data='weight', default=1)
* Address ironpython issues from #1327Dan Schult2015-01-091-8/+9
|
* Meld special classes with base classes.Dan Schult2015-01-021-27/+116
| | | | | This provides the ability to use OrderedGraph or ThinGraph by simple subclassing of Graph.
* Make add_nodes_from compatible with IronPythonysitu2014-07-031-18/+16
|
* clarified edge attribute update precedence in add_edges_from()Arne Neumann2014-04-121-0/+3
|
* Fix/adjust/remove/modify tests that depend on dictionary ordering.Aric Hagberg2012-07-081-3/+0
| | | | | | | | | | Addresses #741 There may still be more that need fixing since 1) NumPy and some other optional packages do not yet work with Python3.3 so those tests weren't checked 2) Finding these errors by running the tests is nondeterministic itself (e.g. passes 4 times and fails on the 5th). And inspecting all of the tests by hand is error-prone too.
* Adjust graph/digraph/multigraph/multidgraph node attribute example so it ↵Aric Hagberg2012-06-231-1/+2
| | | | doesn't depend on data ordering.
* Add comment about edges() v out_edges().Aric Hagberg2012-04-081-0/+1
| | | | Fixes #686
* Change node lookups to G.node instead of G.adjDan Schult2012-02-051-4/+4
| | | | | | | This should help a small amount when playing with alternate data structures. Addreses: #206, #583
* Remove spurious iter() and iter(dict.keys()) calls due to 2to3.Dan Schult2011-06-181-6/+6
| | | | | | In this case all changes were either only used in a for loop, or iter(dict.keys()). Addresses #560
* Remove weight is False or True backward compatibility in degree methods.Dan Schult2011-06-181-4/+2
| | | | Addresses #573
* Change degree() and friends to accept weight= keyword instead of weighted=Dan Schult2011-06-181-36/+53
| | | | weight gives the edge attribute. weighted was simply boolean.
* DiGraph and MultiDigraph reverse(copy=True) methods don't make a proper copy ↵Aric Hagberg2011-06-091-5/+5
| | | | | | of the graph. Addresses #567
* Remove deprecated "from_whatever()" in favor of to_networkx_graph().Aric Hagberg2011-06-041-12/+7
| | | | Tidy style in graph classes.
* Make Graph.name a property that sets/gets Graph.graph['name']Aric Hagberg2011-05-161-5/+1
| | | | Fixes #544
* Add graph attribute 'name'.Aric Hagberg2011-04-161-3/+2
| | | | | Addresses #544 Fixes #543
* Remove statements that do nothing.Loïc Séguin-C.2011-02-111-2/+1
|
* Add reciprocal option in to_undirected().Aric Hagberg2010-09-281-5/+16
| | | | | | | | | Addreses #441 * * * Add tests for to_undirected(reciprocal=). --HG-- extra : rebase_source : 136efa36d3d30d7b2cd90255219a224ad55783dc
* Remove iteritems 2ism and add test.aric2010-08-071-2/+2
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401862
* Merging py3k-1.2 branch into trunk. Addresses #348loicseguin2010-08-021-35/+41
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401832
* Move from list comprehensions to generator expressions where appropriate.dschult2010-05-051-11/+8
| | | | | | | Slight speedup (5-10%) in degree methods. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401743
* Remove annoying white space at end of line...dschult2010-05-041-109/+109
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401741
* Remove the now unused copy=True argument from the subgraph methods.dschult2010-04-181-1/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401708
* Use standard "import networkx as nx" in all modulesaric2010-04-171-0/+1
| | | | | | | | so we don't need nose test plugin to handle doctest strings in modules. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401706
* Remove with_labels keyword from *degree() methods.aric2010-04-151-30/+19
| | | | | | | Addresses #337 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401690
* Improve subgraph documentation about attributes anddschult2010-04-141-3/+3
| | | | | | | | | | remove the copy of graph attributes in subgraph. This way the attribute treatement is consistent. Fixes #314 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401687
* Revert "view" testing - now moved to brancharic2010-04-141-118/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401686
* I'm committing an attempt to give the base classes a methoddschult2010-04-131-1/+118
| | | | | | | | | | | | subgraphview() This returns a read-only view on the subgraph induced by a set of nodes. No attributes processing is attempted so it should be faster than .subgraph() Chris can you test it? I haven't done anything fancy for MultiGraphs edge keys here either. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401684
* Spelling enhancementsaric2010-04-071-1/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401667
* Use to_networkx_graph() instead of from_whatever()aric2010-04-071-4/+2
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401666
* Add more documentation on shallow and deep copiesaric2010-04-061-6/+19
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401658
* Allow add_nodes_from to accept (node,attrdict) 2-tuple pairs.dschult2010-03-251-6/+35
| | | | | | | | Fixes #315 Address #329 (more doc changes needed) --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401604
* Fix subgraph copy of node attributes indschult2010-03-111-1/+2
| | | | | | | digraph, multigraph and multidigraph. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401559
* Change subgraph to create a copy of the connectivitydschult2010-03-051-65/+40
| | | | | | | | | but still point to attr from the original graph. Remove copy keyword argument because in_place subgraph can be done using remove_nodes_from. Update tests accordingly --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401543
* Update benchmark.py to NX1.0 and include speed tests of subgraph with edge data.dschult2010-03-021-12/+37
| | | | | | | | | | | | Implement multi and di versions of the subgraph method speedups. It's still about 4 times slower to subgraph with edgedata than without edgedata. Could speed up edgedata case by making a shallow copy version perhaps controlled by an optional argument. Addresses #314 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401527
* Document in_degree* and out_degree*aric2009-08-291-2/+132
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401446
* License change to BSD.aric2009-08-261-2/+2
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401429
* Fix minor docstring and rst warnings.aric2009-08-141-1/+2
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401381
* Fix spelling erroraric2009-08-131-2/+2
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401378
* change delete_* to remove_* and has_neighbor to has_edgedschult2009-08-131-2/+0
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401377
* Update docstrings... add default values for optional argumentsdschult2009-08-131-36/+43
| | | | | | | | Fixed bug in remove_edges_from when a selfloop edge is removed. Added tests for removing selfloop edges. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401376
* Remove deprecated methods has_neighbor and delete_*aric2009-08-121-7/+0
| | | | | | | Fixes #255 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401370
* Remove path_graph and complete_graph from docstrings in base classesdschult2009-08-111-22/+39
| | | | | | | in favor of G.add_path() to unify the docstrings a little. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401368
* Merge attrgraph branch into trunkaric2009-08-111-593/+676
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401364
* Add documentation to DiGraph's successors to make it cleardschult2009-04-141-2/+8
| | | | | | | that neighbors and successors are the same for DiGraphs. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401192
* Apply patch to add documentation for classes. Addresses #204.aric2009-03-061-45/+472
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401180
* Add in_edges_iter() and in_edges() to DiGraph and MultiDiGrapharic2008-12-211-3/+54
| | | | | | | | | | Alias out_edges_iter() and out_edges() to edges() in DiGraph and MultiDiGraph Fixes #205 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401098
* implement DiGraph reverse by switching pred and succ dictionariesaric2008-12-021-3/+10
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401070
* fix docstrings in graph and digrapharic2008-11-081-32/+0
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%40923