Changes between Version 1 and Version 15 of Ticket #15060


Ignore:
Timestamp:
12/10/13 15:57:51 (6 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15060

    • Property Dependencies changed from to #10093
  • Ticket #15060 – Description

    v1 v15  
    55If my understanding of good terminology is correct, this should not be the case (see http://ncatlab.org/nlab/show/too+simple+to+be+simple ). Note that {{{Graph({}).is_tree()}}} correctly returns {{{False}}}.
    66
    7 Another issue is that
     7Another issue is
    88{{{
    9 Graph({}).is_triangle_free()
     9sage: Graph({}).is_triangle_free()
     10---------------------------------------------------------------------------
     11ValueError                                Traceback (most recent call last)
     12<ipython-input-2-70aaa16d3aa5> in <module>()
     13----> 1 Graph().is_triangle_free()
     14
     15/usr/local/src/sage-5.13.beta1/local/lib/python2.7/site-packages/sage/graphs/graph.pyc in is_triangle_free(self, algorithm)
     16   2287                 B[v].add(map[u])
     17   2288             # map lengths 2 paths to bitsets
     18-> 2289             BB = Bitset(capacity=N)
     19   2290             for u in self.vertex_iterator():
     20   2291                 BB.clear()
     21
     22/usr/local/src/sage-5.13.beta1/local/lib/python2.7/site-packages/sage/misc/bitset.so in sage.misc.bitset.FrozenBitset.__cinit__ (sage/misc/bitset.c:5023)()             
     23                                                                                                                                                                       
     24/usr/local/src/sage-5.13.beta1/local/lib/python2.7/site-packages/sage/misc/bitset.so in sage.misc.bitset.bitset_init (sage/misc/bitset.c:1256)()                       
     25                                                                                                                                                                       
     26ValueError: bitset capacity must be greater than 0
    1027}}}
    11 seems to allocate lots of RAM and possibly die with a MemoryError (it did so on the Sage cell server; on my machine I had to ctrl-alt-del the VM). The culprit seems to be {{{Bitset(capacity=0)}}}. It looks like {{{is_triangle_free}}} is the only method ever using the {{{Bitset(capacity=X)}}} construction, so I'm not opening up a new ticket for this.