#18185: Clean the Graph/DiGraph constructors
----------------------------+---------------------------------
   Reporter:  ncohen        |            Owner:
       Type:  defect        |           Status:  new
   Priority:  major         |        Milestone:  sage-6.6
  Component:  graph theory  |         Keywords:
  Merged in:                |          Authors:  Nathann Cohen
  Reviewers:                |  Report Upstream:  N/A
Work issues:                |           Branch:
     Commit:                |     Dependencies:  #18067
   Stopgaps:                |
----------------------------+---------------------------------
 The Graph and DiGraph constructor are rather long, and rather messy, as
 they are meant to accept a LOT of different inputs.

 The point of this branch is to simplify its logic, in order to be able to
 split it into subfunctions later.

 Here is the current logic:
 1) Detect and set the 'format' if it was not specified
 2) For every possible format, define whether the graph should allow
 loops/multiedges
 3) Pick a data structure (i.e. backend) and create it
 4) For every possible format, add vertices and edges

 Besides local fixes and modifications, this branch moves '3' right after
 '1'. Then, '3' and '4' are merged so that we only enumerate all possible
 formats once.

 I tried to split commits to make it easier to review. I know that it will
 not be very easy to read. It was not exactly easy to write either.

--
Ticket URL: <http://trac.sagemath.org/ticket/18185>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to