Hi Volker, Fine, I am now convinced that you are right - we do need more subclasses of cones ;-) And probably the same for fans?
Since I am still a bit paranoid about speed and memory consumption, what do you think of the following scheme: Make classes EnhancedFan and Enhanced Cone (not exposed to the end user). Their use will be like this (as well as for derived classes): sage: econe = EnhancedCone(usual_cone) which will return the enhanced cone associated to usual_cone, and sage: efan = EnhancedFan(usual_fan, EnhancedCone) which will return the enhanced fan with enhanced cones (and it can take any derived class as an argument). I think that ideal implementation for these classes would be to NOT derive from Fan and Cone, but instead store an object of the corresponding class in an internal attribute and send all unknown methods to these objects via __getattr__. This will not only eliminate copying of ray structures, but will also allow sharing of all cached data computed after creation of these enhanced objects. If there are any issues - switching to honest derivation will not change the behavior for classes derived from these, where you can do whatever you want to accommodate morphisms but still have direct access to rays(), fan_rays(), and all other things available in cones. Since it seems that we are close to agreeing on the above or something quite similar, we can proceed like this: Me (soon): - add ToricLattice and ToricLatticeMorphism classes - make cones and fans use these lattices by default - change fans to allow easy extensions - change names in fano_toric_variety and rewrite the introduction accordingly You: - review these patches - add fan morphisms (in a "combinatorial way" to sage.geometry) - add other computations Me: - review your patches - eventually make scheme-type morphisms of toric varieties work nicely (in sage.schemes) Thank you, Andrey -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org