#8987: Add support for rational polyhedral fans
----------------------------------+-----------------------------------------
Reporter: novoselt | Owner: mhampton
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.4.4
Component: geometry | Keywords:
Author: Andrey Novoseltsev | Upstream: N/A
Reviewer: Volker Braun | Merged:
Work_issues: |
----------------------------------+-----------------------------------------
Comment(by novoselt):
OK, I also think that any cone in the fan must be called a cone. The only
"face thing" that I would still like to keep is "face_lattice" since it
allows the same code in `Cone` work for a cone which is not a part of
anything, a part or another cone, or a part of a fan.
(However, I can do it using a privite function or `__getattr__` hook, if
you think it would be better.)
Should cones of fan print as
{{{
2-dimensional cone of Rational polyhedral fan in 3-dimensional lattice N
}}}
? Right now the following is a bit inconsistent:
{{{
sage: cone = Cone([(1,0), (0,1)])
sage: for l in cone.face_lattice().level_sets(): print l
....:
[0-dimensional face of 2-dimensional cone]
[1-dimensional face of 2-dimensional cone, 1-dimensional face of
2-dimensional cone]
[2-dimensional cone]
sage: fan = Fan([cone])
sage: for l in fan.cone_lattice().level_sets(): print l
....:
[0-dimensional cone]
[1-dimensional cone, 1-dimensional cone]
[2-dimensional cone]
[Rational polyhedral fan in 2-dimensional lattice N]
sage: cone_of_fan = fan(2)[0]
sage: for l in cone_of_fan.face_lattice().level_sets(): print l
....:
[0-dimensional cone]
[1-dimensional cone, 1-dimensional cone]
[2-dimensional cone]
}}}
So I think either all cones should just print as plain standalone cones,
or they should always mention the ambient structure if it exists. For
latexing I am using `\subset` between `self` and `ambient` and think that
it looks awesome ;-) For string representation I try to keep it short, but
it is nice to see something distinguishing about objects.
I don't want to prohibit non-strictly convex cones completely, since I
think that we definitely should have a function for computing dual cones.
So far I was thinking of `ambient` as an ambient `RayCollection`, i.e. we
have a collection of rays that happened to be a subset of another ray
collection. I do, however, want to put some face-related internal
functions that will assume that `self` is a face of `ambient` and,
therefore, face lattice of `self` is a sublattice of face lattice of
`ambient`. The reason is that the main point of knowing that `self` is a
part of something bigger is to allow nice walking along the "largest
containing face lattice." I didn't really think about it before, so I
wrote only `face_lattice` and `faces` for cones and `cone_lattice` and
`cones` for fans. But when you have suggested adding methods to cones that
allow to go up/down/"horizontally" starting from the cone itself and
without direct use of face/cone lattice of the containing object, I have
realized that it will be extremely cool and convenient, and that behaviour
of elements of face lattice for cones should be the same as for elements
of cone lattice for fans. So I tried to make uniform methods instead of
`cone/fan` to access the ambient structure and `cone_rays/fan_rays` to see
how something sits inside it.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8987#comment:33>
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.