#12544: Switch cones to `PointCollection`
--------------------------------------------------+-------------------------
Reporter: novoselt | Owner: mhampton
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.0
Component: geometry | Resolution:
Keywords: toric | Work issues: output
formatting
Report Upstream: N/A | Reviewers:
Authors: Andrey Novoseltsev | Merged in:
Dependencies: #11599, #11634, #12541, #12361 | Stopgaps:
--------------------------------------------------+-------------------------
Comment (by novoselt):
After sleeping on it and thinking some more:
Overriding `_repr_` is not acceptable, as it makes computations not
reproducible by others (unless they also do the same overriding, but
understanding it requires some knowledge of Sage internal conventions).
Looking at matrices with rays/points/vectors as columns is not just my
invention, e.g. PALP, which is familiar to a number of people, does it as
well as long as the matrix fits the terminal. Then it switches to row
vectors (the switch, I think, is quite confusing). It is also quite common
practice in linear algebra as I was reminded recently having to cover some
classes. And that's why Rob Beezer added `column_matrix` constructor.
So I think that:
* The representation should not change depending on dimension or number
of rays.
* To make it fit on the terminal, it is better to use one line per ray.
* I still think that it is the best for typeset notebook version to have
rays as columns, so I really want to have it as an option.
* I don't see what is the problem with having a function like
`sage.geometry.point_collection.default_representation` which allows you
switch between lists and matrices or anything else, it just makes Sage
more flexible and provides a standard way of adjusting it rather than
hacking its guts.
* It is indeed confusing when `rays.matrix()` returns the transpose of
the matrix in representation.
To address all of this, I propose:
* Default text output as was shown above, in particular, that's what will
be used in all doctests.
* Default LaTeX output similar to it, packing it into array for
alignment.
* Add a method `rays.column_matrix()` which returns the matrix with rays
as columns. This would make it consistent with `matrix(rays)` and
`column_matrix(rays)`.
* Add a function for changing the output to other forms, most of all
"rays as columns" which will refer to the method `column_matrix` to
describe it: all confusion should be gone, I'll be happy, and the default
output will be as you prefer, so to me it sounds like a reasonable
compromise.
It could be awesome to draw vertical lines between columns to indicate the
direction of rays, but jsMath swallows them, so what's the point...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12544#comment:22>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.