#16799: clique polynomial of a graph
-------------------------------------+-------------------------------------
       Reporter:  amri               |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-6.4
      Component:  graph theory       |   Resolution:
       Keywords:  days60             |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/amri/graphs/16799-clique_poly|  
08c42f18d700feeb425dc0d9c1f1cb2bfa0d453d
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by ncohen):

 * status:  needs_review => needs_work


Comment:

 Hello again !

 * You say that the constant term is expected to be 0 in the doc, but in
 the examples it is equal to 1

 * You can use `IndependentSets(g,complement=True)` instead of
 `IndependentSets(g.complement())`. Computing the complement of a sparse
 graph is rather slow.

 * The documentation of a function should begin with a short one-line
 description. Anything can follow, it can be as long as you want, though.
 It can be the line that appears right next to the function, in the index
 at the top of the file

 * If you change
   {{{return sum([number_of[i]*t**i for i in range(self.order()+1)])}}}

   into

   {{{return sum([coeff*t**i for i,coeff in enumerate(number_of) if
 coeff])}}}

   You avoid computing the {{{t**i}}} that will be multiplied by 0. It does
 not bring any detectable speedup in this case, however.
 Nathann

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