#15240: Switch lattice polytopes to point collections
-------------------------------------------------+-------------------------
       Reporter:  novoselt                       |        Owner:
           Type:  enhancement                    |       Status:  closed
       Priority:  major                          |    Milestone:  sage-6.2
      Component:  geometry                       |   Resolution:  fixed
       Keywords:  toric sd53                     |    Merged in:
        Authors:  Andrey Novoseltsev             |    Reviewers:  Volker
Report Upstream:  N/A                            |  Braun
         Branch:                                 |  Work issues:
  e5c95061922498ae02ac202e70dda4c82bb8dabe       |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Old description:

> The goals of this ticket are:
>  * make the code of `LatticePolytope` less interdependent for easier
> maintenance and backend switch;
>  * use `PointCollection` container internally to unify it with other
> classes for toric geometry (`Cone` and `Fan`);
>  * deprecate current methods returning points as matrices so that their
> output can be changed in the future.
>
> One of the easiest to discover changes is deprecation of polytope-from-
> matrix constructor:
> {{{
> sage: LatticePolytope(identity_matrix(3))
> /home/novoselt/sage.git/src/bin/sage-ipython:1: DeprecationWarning:
> constructing lattice polytopes from matrices is deprecated!
> See http://trac.sagemath.org/15240 for details.
>   #!/usr/bin/env python
> 2-d lattice polytope in 3-d lattice M
> }}}
> to get the same result without the deprecation warning one has to do
> {{{
> sage: LatticePolytope(identity_matrix(3).columns())
> }}}
> although it in most cases users had to pack points into a column matrix
> and then call lattice polytope constructor. Now they can just omit the
> packing step. Note that matrices will eventually be accepted again as
> valid input since they are "iterables of iterables", but **rows** of a
> matrix will be viewed as points, not **columns**.

New description:

 The goals of this ticket are:
  * make the code of `LatticePolytope` less interdependent for easier
 maintenance and backend switch;
  * use `PointCollection` container internally to unify it with other
 classes for toric geometry (`Cone` and `Fan`);
  * deprecate current methods returning points as matrices so that their
 output can be changed in the future.

 One of the easiest to discover change is the deprecation of the polytope-
 from-matrix constructor:
 {{{
 sage: LatticePolytope(identity_matrix(3))
 /home/novoselt/sage.git/src/bin/sage-ipython:1: DeprecationWarning:
 constructing lattice polytopes from matrices is deprecated!
 See http://trac.sagemath.org/15240 for details.
   #!/usr/bin/env python
 2-d lattice polytope in 3-d lattice M
 }}}
 To get the same result without the deprecation warning one has to do
 {{{
 sage: LatticePolytope(identity_matrix(3).columns())
 }}}

 In most cases users had to pack points into a column matrix and then
 call the lattice polytope constructor. Now they can just omit the packing
 step.

 Note that matrices will eventually be accepted again as valid input
 since they are "iterables of iterables", but **rows** of a matrix will
 be viewed as points, not **columns**.

--

Comment (by nthiery):

 Thanks!

 No clue about the warning.

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