summaryrefslogtreecommitdiff
path: root/networkx/classes/multigraph.py
Commit message (Collapse)AuthorAgeFilesLines
* "Warning" is not a numpydoc sectionAric Hagberg2015-06-131-4/+2
|
* pep8 for multigraphGoran Cetusic2015-03-261-112/+106
|
* Expand data keyword in G.edges and add default dataDan Schult2015-01-171-40/+68
| | | | | | | | | | | | | | | 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-22/+96
| | | | | This provides the ability to use OrderedGraph or ThinGraph by simple subclassing of Graph.
* clarified edge attribute update precedence in add_edges_from()Arne Neumann2014-04-121-0/+3
|
* Adjust graph/digraph/multigraph/multidgraph node attribute example so it ↵Aric Hagberg2012-06-231-1/+2
| | | | doesn't depend on data ordering.
* Allow .remove_edges_from() to work with 4-tuples (u,v,k,d) for multi(di)graph.Dan Schult2012-06-201-1/+2
| | | | Fixes #736
* Add comment about edges() v out_edges().Aric Hagberg2012-04-081-0/+2
| | | | 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
* Correct name for "see also" docstrings with method nodes_with_selfloops()Dan Schult2011-11-211-1/+1
| | | | Addresses #653
* Remove spurious iter() and iter(dict.keys()) calls due to 2to3.Dan Schult2011-06-181-2/+2
| | | | | | 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-1/+1
| | | | Addresses #573
* Change degree() and friends to accept weight= keyword instead of weighted=Dan Schult2011-06-181-10/+13
| | | | weight gives the edge attribute. weighted was simply boolean.
* Remove deprecated "from_whatever()" in favor of to_networkx_graph().Aric Hagberg2011-06-041-11/+6
| | | | Tidy style in graph classes.
* 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-2/+2
| | | | | | | multiedges. --HG-- extra : rebase_source : 67b261bf1d622af0e14f6e9787acbc5b052db253
* Merging py3k-1.2 branch into trunk. Addresses #348loicseguin2010-08-021-34/+37
| | | | | --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-5/+4
| | | | | | | 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-90/+90
| | | | | --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-3/+10
| | | | | --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-62/+37
| | | | | | | | | 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-20/+86
| | | | | | | | | | | | 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-12/+10
| | | | | | | | | | | 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-8/+32
| | | | | | | 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-15/+18
| | | | | | | | 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-25/+63
| | | | | | | in selfloop_edges() --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401460
* 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/+4
| | | | | --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-39/+56
| | | | | | | | 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-8/+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-14/+24
| | | | | | | 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-565/+539
| | | | | --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-7/+18
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401180
* Add documentation for MultiGraph and fixes in Graph.aric2009-03-021-17/+516
| | | | | | | Addresses #204. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401170
* Improve multigraph documentationaric2009-02-281-6/+7
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401163
* Merged multigraph-dict branch 1138:1161 into trunk. Addresses #225aric2009-02-271-51/+129
| | | | | --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401162
* Raise exception when trying to remove edges inaric2009-01-191-7/+6
| | | | | | | 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-2/+2
| | | | | | | | 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-17/+27
| | | | | | | | | | | | 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
* Switch has_edge API back to previous version where it optionally checks for ↵dschult2008-12-091-0/+10
| | | | | | | | | | | edge data. Aric, if you prefer that it require edge data so users can test for data==None please feel free to commit such. Addresses #203 --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401088
* Unify tests and code in add_edges_from() for all classes.dschult2008-12-021-4/+7
| | | | | | | Gives NetworkXError if tuples can't be unpacked correctly. --HG-- extra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401071