#12181: random_DAG does not terminate on it's default inputs
------------------------------------------+---------------------------------
       Reporter:  mderickx                |         Owner:  tbd          
           Type:  defect                  |        Status:  needs_review 
       Priority:  major                   |     Milestone:  sage-5.3     
      Component:  graph theory            |    Resolution:               
       Keywords:  random digraph          |   Work issues:               
Report Upstream:  N/A                     |     Reviewers:  David Coudert
        Authors:  dsm, Frédéric Chapoton  |     Merged in:               
   Dependencies:                          |      Stopgaps:               
------------------------------------------+---------------------------------

Comment (by chapoton):

 > - The instruction {{{weight_max=ZZ(weight_max)}}} is before the test on
 weights. Is this what you expect?
 > {{{
 > sage: random_DAG(5,.5,1.5)
 >
 ---------------------------------------------------------------------------
 > TypeError                                 Traceback (most recent call
 last)
 > ...
 > TypeError: Attempt to coerce non-integral RealNumber to Integer
 > }}}

 Yes, indeed. Well, this seems to be a reasonable way to ensure that the
 input is of correct type, as specified in the documentation. The problem
 is that one should accept both '''int''' and '''Integers''' as third
 argument. This is the case with what I have written, which tries to coerce
 to Integers.



 > - The output is not only a dictionary but a dictionary of dictionary.
 You should perhaps add a warning comment since the space requirement for
 large values of n could be too high. I don't know the usual size of the
 DAG used in this context.

 Well, a dictionary of dictionaries is a dictionary, isn't it ? And by the
 way, I have not found any place in the sources of Sage where this
 procedure is used.


 > - I'm unable to build/find the documentation. Are you able to build it?

 Sorry, I do not understand this remark. I have only tried the doc in a
 terminal. Should I try it in the notebook too ? Should I do something else
 ? Could you pinpoint a specific problem ?


 > - I agree that moving this function into digraphs_generator could be
 done as part of another patch. It should in particular have an optional
 argument allowing to have multiple sinks (and so avoiding the while loop).
 With current setting, I'm not sure that the average number of arcs is
 ``p*n``.

 Well, this ticket is here to solve a specific problem, and the rest can be
 postponed to some other ticket.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12181#comment:18>
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