#15051: "vector is immutable" in polyhedron.integral_points()
------------------------+-----------------------------
   Reporter:  vbraun    |            Owner:
       Type:  defect    |           Status:  new
   Priority:  major     |        Milestone:  sage-5.12
  Component:  geometry  |         Keywords:
  Merged in:            |          Authors:
  Reviewers:            |  Report Upstream:  N/A
Work issues:            |           Branch:
     Commit:            |     Dependencies:
   Stopgaps:            |
------------------------+-----------------------------
 If the more sophisticated point counting algorithm is used then one gets
 the following error
 {{{
 sage: poly=Polyhedron(vertices=[(1, 0, 0, 0), (1, 2, 0, 0), (1, 0, 2, 0),
 (1, 0, 2, 6), (-11, -4, -6, -12), (-11, -4, -6, -6), (13, 6, 8, 12)])
 sage: poly.integral_points()
 ---------------------------------------------------------------------------
 ValueError                                Traceback (most recent call
 last)
 <ipython-input-8-4f101e993c5f> in <module>()
 ----> 1 poly.integral_points()

 /home/vbraun/Code/sage.git/local/lib/python2.7/site-
 packages/sage/geometry/polyhedron/base.pyc in integral_points(self,
 threshold)
    3866         for simplex in triangulation:
    3867             triang_vertices = [ self.Vrepresentation(i) for i in
 simplex ]
 -> 3868             new_points = simplex_points(triang_vertices)
    3869             for p in new_points:
    3870                 p.set_immutable()

 /home/vbraun/Code/sage.git/local/lib/python2.7/site-
 packages/sage/geometry/integral_points.so in
 sage.geometry.integral_points.simplex_points
 (sage/geometry/integral_points.c:2884)()

 /home/vbraun/Code/sage.git/local/lib/python2.7/site-
 packages/sage/geometry/integral_points.so in
 sage.geometry.integral_points.translate_points
 (sage/geometry/integral_points.c:3370)()

 /home/vbraun/Code/sage.git/local/lib/python2.7/site-
 packages/sage/modules/vector_integer_dense.so in
 sage.modules.vector_integer_dense.Vector_integer_dense.__setitem__
 (sage/modules/vector_integer_dense.c:3624)()

 ValueError: vector is immutable; please change a copy instead (use copy())
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/15051>
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/groups/opt_out.

Reply via email to