summaryrefslogtreecommitdiff
path: root/networkx/classes/multidigraph.py
Commit message (Collapse)AuthorAgeFilesLines
* "Warning" is not a numpydoc sectionAric Hagberg2015-06-131-4/+2
|
* pep8 for multidigraphGoran Cetusic2015-03-261-116/+113
|
* Expand data keyword in G.edges and add default dataDan Schult2015-01-171-18/+32
| | | | | | | | | | | | | | | 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)
* Meld special classes with base classes.Dan Schult2015-01-021-10/+96
| | | | | This provides the ability to use OrderedGraph or ThinGraph by simple subclassing of Graph.
* 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-1/+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-4/+4
| | | | | | 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-5/+5
| | | | Addresses #573
* Change degree() and friends to accept weight= keyword instead of weighted=Dan Schult2011-06-181-27/+37
| | | | 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-0/+26
| | | | | | of the graph. Addresses #567
* Remove deprecated "from_whatever()" in favor of to_networkx_graph().Aric Hagberg2011-06-041-15/+7
| | | | Tidy style in graph classes.
* Use iterators instead of lists when possible. Addresses #560Loïc Séguin-C.2011-05-281-2/+2
|
* Make Graph.name a property that sets/gets Graph.graph['name']Aric Hagberg2011-05-161-3/+0
| | | | Fixes #544
* More imports cleanup and exceptions fixed.Loïc Séguin-C.2011-02-101-2/+1
|
* Start edge key search at len(keydict) instead of 0 to save time with many ↵Dan Schult2010-11-291-1/+1
| | | | | | | multiedges. --HG-- extra : rebase_source : 67b261bf1d622af0e14f6e9787acbc5b052db253
* Add MultiDiGraph in_edges() and out_edges() methods.Aric Hagberg2010-11-161-0/+58
| | | | Addresses #469
* Fix bug in degree_iter(weighted=True) for MultiGraphs.Aric Hagberg2010-11-081-1/+1
| | | | Fixes #460
* Add reciprocal option in to_undirected().Aric Hagberg2010-09-281-5/+18
| | | | | | | | | Addreses #441 * * * Add tests for to_undirected(reciprocal=). --HG-- extra : rebase_source : 136efa36d3d30d7b2cd90255219a224ad55783dc
* Merging py3k-1.2 branch into trunk. Addresses #348loicseguin2010-08-021-46/+49
| | | | | --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-25/+16
| | | | | | | 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-74/+74
| | | | | --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
* 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
* Spelling enhancementsaric2010-04-071-2/+2
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401667
* Use to_networkx_graph() instead of from_whatever()aric2010-04-071-1/+0
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401666
* Add more documentation on shallow and deep copiesaric2010-04-061-6/+18
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401658
* 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-68/+42
| | | | | | | | | 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-0/+92
| | | | | | | | | | | | 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
* Silly changes to remove_edge that might speed it up and hopefullydschult2009-10-161-5/+6
| | | | | | | | | | | make it easier to read. Simplify remove_edges_from code to rely on remove_edge more and avoid checking for the edge twice. Addresses #284 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401484
* Add to docstring in remove_edge: a second cause of raising NetworkXErrordschult2009-10-161-1/+2
| | | | | | | Addresses #284 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401483
* Add documentation and adjust tests for remove_edge() change.aric2009-10-161-6/+19
| | | | | | | Addresses #284 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401482
* Change remove_edge() behavior for MultiGraph and MultiDiGrapharic2009-10-161-13/+16
| | | | | | | | to remove a single edge when no key is specified. Addresses #284 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401481
* Add more documentation to MultiGraph and MultiDiGraph. Allow optional keys=aric2009-09-091-5/+5
| | | | | | | in selfloop_edges() --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401460
* Document in_degree* and out_degree*aric2009-08-291-0/+62
| | | | | --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/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401381
* Fix spelling erroraric2009-08-131-1/+1
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401378
* Update docstrings... add default values for optional argumentsdschult2009-08-131-28/+57
| | | | | | | | 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-2/+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-5/+35
| | | | | | | 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-539/+363
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401364
* Apply patch to add documentation for classes. Addresses #204.aric2009-03-061-66/+440
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401180
* Merged multigraph-dict branch 1138:1161 into trunk. Addresses #225aric2009-02-271-84/+101
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401162
* Raise exception when trying to remove edges inaric2009-01-191-8/+7
| | | | | | | multigraph when specifying non-matching data. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401120
* Fix case in MultiGraph and MultiDiGraph where twoaric2009-01-121-4/+6
| | | | | | | | edges are removed (the last two) when only one should be removed. Add tests for this case. Fixes #217. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401118
* Rename get_edge() to get_edge_data(). Now returns None asaric2008-12-221-23/+0
| | | | | | | | | | | | a default if no edge is found. Change function of has_edge() to take two aguments (nodes). It has exactly the same behavior now as has_neighbor() Addresses #203 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401099
* Add in_edges_iter() and in_edges() to DiGraph and MultiDiGrapharic2008-12-211-1/+21
| | | | | | | | | | 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