#13970: Fix memory allocation in distances all pairs
---------------------------------+------------------------------------------
       Reporter:  dcoudert       |         Owner:  jason, ncohen, rlm
           Type:  enhancement    |        Status:  needs_review      
       Priority:  major          |     Milestone:  sage-5.7          
      Component:  graph theory   |    Resolution:                    
       Keywords:                 |   Work issues:                    
Report Upstream:  N/A            |     Reviewers:  Nathann Cohen     
        Authors:  David Coudert  |     Merged in:                    
   Dependencies:                 |      Stopgaps:                    
---------------------------------+------------------------------------------

Comment (by dcoudert):

 Nathann,

 > - `sizeof(unsigned anything)` *is* equal to `sizeof(anything)`

 Sure, but it is better to be consistent: easier to read.

 > - `for i in range(n):` is totally equivalent to `for 0<= i<n`
 (http://www.steinertriples.fr/ncohen/a.png)

 OK, I can change that

 > - was there a problem with the variable `s` that you remove, even when
 it is defined as an `uint64_t` ? In the worst situation, `s` could be
 equal to something around `n^3`, so as `n` is at most `2^16`, this should
 be sufficient.

 This is sufficient. I have just been lazy. I will include the type.

 > By the way, what do you mean by "the function fails". Does it raise an
 exception, or is the result that it returns wrong ?

 With 65534 nodes, the {{{init_short_digraph}}} method takes a few seconds.
 With 65535 nodes, I had to kill the process (after > 1 hour). I don't know
 yet whats going on. I have to investigate further with some print
 statements...

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13970#comment:8>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to