Changes between Version 5 and Version 6 of Ticket #14806


Ignore:
Timestamp:
06/24/13 09:05:05 (6 years ago)
Author:
ncohen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14806

    • Property Owner changed from tbd to jason, ncohen, rlm
    • Property Component changed from PLEASE CHANGE to graph theory
  • Ticket #14806 – Description

    v5 v6  
    1010}}}
    1111
    12 Content of [attachment:trac_14806.patch] :
     12The patch :
     13
    1314* Creates a new sage.graphs.base.static_sparse_backend modules containing two classes, StaticSparseCGraph and StaticSparseBackend, as it is done for the current sparse/dense backends.
    1415* Updates the static_sparse_graph data structure to handle labels
    1516* Updates the constructors of Graph and DiGraph by renaming the ``sparse`` keyword to ``data_structure`` which can now be set to ``sparse,dense`` or ``static_sparse`` (and others later)
     17* Deals with the consequences of renaming the keyword, i.e. changes doctests everywhere in the graph/ files, and into some other files of Sage too.
    1618
    17 Content of [attachment:trac_14806-update_keyword.patch] :
    18 * Deals with the consequences of renaming the keyword, i.e. changes doctests everywhere in the graph/ files, and into some other files of Sage too.
     19I tested this patch in many many ways, and in particular by adding at the end of graph/digraph `__init__` method the following two lines:
     20* (if the backend is not static) build a copy of self using a static backend
     21* Check that both are equal, and otherwise scream in panic
     22
     23This being said, many graph methods will break when the backend is static. The most obvious ones are add/remove vertex/edges, but other methods will break which supposed that any graph can be modified. For methods which do not modify the graph itself, this happens when it creates a temporary copy of it (which will use the same backend), and feel free to change that one.
     24
     25I don't see an automatic way to spot them, I don't think it is very bad as this static backend is a new feature and hence will not break any existing code, and this patch is already very long (and hard to review) as it is `^^;`
    1926
    2027Nathann