Opened 5 months ago

Closed 4 months ago

#26627 closed enhancement (fixed)

clean generic_graph.py (part 2)

Reported by: dcoudert Owned by:
Priority: major Milestone: sage-8.5
Component: graph theory Keywords: py3, graph
Cc: tscrim, chapoton Merged in:
Authors: David Coudert Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 9ff4341 (Commits) Commit: 9ff4341ef7bda517176e0dce35fb1981d7ef4741
Dependencies: Stopgaps:

Description

Done here:

  • alignment and PEP8 cleaning from method is_immutable to igraph_graph
  • in networkx_graph: use the order of .edge_iterator() to add edges to the graph instead of .edges(). This is safe but a doctest in graph.py must be updated
  • in igraph_graph:
    1. add parameter vertex_list to define the mapping vertices to consecutive integers. By default, use .vertices().
    2. use vertex_list in method flow accordingly.
    3. correct all doctest to show that edge attributes must be given in the order of .edge_iterator(), as documented, and not .edges().

Change History (7)

comment:1 Changed 5 months ago by dcoudert

  • Branch set to public/26627_generic_graph_part_2
  • Commit set to 9ff4341ef7bda517176e0dce35fb1981d7ef4741
  • Status changed from new to needs_review

New commits:

9ff4341trac #26627: generic_graph.py (part 2)

comment:2 Changed 5 months ago by chapoton

Did you fix here "weighted_adjacency_matrix" so that it no longer use .vertices ?

This would be useful for the sandpiles.

comment:3 Changed 5 months ago by dcoudert

No, it will be in next ticket (If I'm able to fix the issue). It's such a big file that I'm processing almost linearly and commit a ticket each time some non trivial change is done.

comment:4 Changed 5 months ago by dcoudert

  • Component changed from PLEASE CHANGE to graph theory
  • Type changed from PLEASE CHANGE to enhancement

comment:5 Changed 5 months ago by dcoudert

See #26630 for "weighted_adjacency_matrix".

comment:6 Changed 5 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

comment:7 Changed 4 months ago by vbraun

  • Branch changed from public/26627_generic_graph_part_2 to 9ff4341ef7bda517176e0dce35fb1981d7ef4741
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.