Opened 7 years ago

Last modified 7 years ago

#13862 closed enhancement

Split graph_generators into several files — at Version 6

Reported by: ncohen Owned by: jason, ncohen, rlm
Priority: major Milestone: sage-5.6
Component: graph theory Keywords:
Cc: dcoudert Merged in:
Authors: Nathann Cohen Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by ncohen)

This tickets addresses the fact that Jeroen is not happy with the length of graph_generators.py :-P

It splits the file into new ones, added in the graph/generators/ folder, according to the classifiation of the methods that appears in the module's documentation.

APPLY:

Change History (9)

comment:1 Changed 7 years ago by ncohen

  • Authors set to Nathann Cohen
  • Cc dcoudert added
  • Component changed from PLEASE CHANGE to graph theory
  • Owner changed from tbd to jason, ncohen, rlm
  • Type changed from PLEASE CHANGE to enhancement

comment:2 Changed 7 years ago by ncohen

  • Description modified (diff)

This patch creates the following files and moves into them the methods from GraphGenerator that are associated to it in the list at the top of the graph_generators module documentation.

  • basic.py
  • degree_sequence.py
  • families.py
  • platonic_solids.py
  • random.py
  • smallgraphs.py
  • world_map.py

This patch passes all tests, but is not clean yet and lacks documentations. Others will follow.

Nathann

Last edited 7 years ago by ncohen (previous) (diff)

Changed 7 years ago by ncohen

comment:3 Changed 7 years ago by ncohen

What this additional (trac_13862-cleaning_and_moving.patch) patch does :

  • Moves _circle_embedding and _line_embedding to graph_plot.py. These methods are now imported at the beginning of generators/* modules that need need.
  • Removes LCFGraph from the list of basc graphs (this methods creates a family of graphs). It was already in the list of "families" graphs.
  • Moves the Harary Graph to the "families" file. Same thing here : there are many Harary graphs.
  • Moves DorogovtsevGoltsevMendesGraph to families.py. Not worth creating an independent "pseudofractal" module at the moment.
  • Moves IntervalGraph to families. This one was not liste among the "families", which is why it was still in graph_generators.py after the first patch.
  • Adds the Nauru Graph to the list of small graphs.

Some work on the doc is still needed.

Nathann

Changed 7 years ago by ncohen

comment:4 Changed 7 years ago by ncohen

Apply trac_13862.patch, trac_13862-cleaning_and_moving.patch

comment:5 Changed 7 years ago by ncohen

  • Description modified (diff)

comment:6 Changed 7 years ago by ncohen

  • Description modified (diff)

What this new patch (trac_13862-doc.patch) does :

  • Moves the "Usage" part of the graph_generators module's doc to graph_plot, as it explains how graphs are displayed.
  • *HEAVY* rewrite of the fuctions lists at the top of graph_generators. Now the methods are listed in 3xN tables, so that they are easier to browse. This required to define an (ugly) helper function in graph_generators.py. But the lists at the top of that file are now easier to read (both in html and in sage.graphs.graph_generators?) and easier to update (just add a string in a list).
  • NauruGraph isadded to the list of small graphs

This patch's almost ready.

Nathann

Changed 7 years ago by ncohen

Note: See TracTickets for help on using tickets.