#14076: Update ChomP to latest upstream version (compilation failure)
--------------------------------------+-------------------------------------
Reporter: cnassau | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-5.10
Component: packages: optional | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Volker Braun | Merged in:
Dependencies: #14595 | Stopgaps:
--------------------------------------+-------------------------------------
Comment (by vbraun):
Also, this blows up in your face:
{{{
sage: t0 = SimplicialComplex()
sage: t0.add_face(('a', 'b'))
sage: t0._numeric
True
}}}
No its not!
{{{
sage: t0.homology()
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
<ipython-input-27-8061bc7260ca> in <module>()
----> 1 t0.homology()
/home/vbraun/opt/sage-5.10.beta5/local/lib/python2.7/site-
packages/sage/homology/cell_complex.pyc in homology(self, dim, **kwds)
521 if 'subcomplex' in kwds:
522 del kwds['subcomplex']
--> 523 H = homsimpl(self, subcomplex, **kwds)
524 # now pick off the requested dimensions
525 if H:
/home/vbraun/opt/sage-5.10.beta5/local/lib/python2.7/site-
packages/sage/interfaces/chomp.pyc in homsimpl(complex, subcomplex,
**kwds)
481 if (isinstance(complex, SimplicialComplex)
482 and (subcomplex is None or isinstance(subcomplex,
SimplicialComplex))):
--> 483 return CHomP()('homsimpl', complex, subcomplex=subcomplex,
**kwds)
484 else:
485 raise TypeError, "Complex and/or subcomplex are not
simplicial complexes."
/home/vbraun/opt/sage-5.10.beta5/local/lib/python2.7/site-
packages/sage/interfaces/chomp.pyc in __call__(self, program, complex,
subcomplex, **kwds)
209 elif simplicial:
210 m = re.search(r'\(([^,]*),', data)
--> 211 v = int(m.group(1))
212 subcomplex = SimplicialComplex([[v]])
213 else:
ValueError: invalid literal for int() with base 10: "'a'"
}}}
Its a bit of a variant of #14578: caching for mutable objects is fragile.
Its difficult to get right, and even if you do you'll break it when you
make changes in the future.
The right thing to do is to make cell complexes immutable, and `add_face`
/ `remove_face` return new cell complexes. With an `add_faces` analogue to
add multiple faces in one go to avoid performance issues. Bonus: the cell
complexes can then be parents for chains. Thoughts?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14076#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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.