I was hoping to get at the individual elements listed by L.level_sets() [-3:-2], but these seem to be stored in a 1 element list which contains the actual list of elements in the specified level set, so L.level_sets()[-3:-2][0][i].element.property() is the only way I've been able to get at property() of the i-th element of the list of elements in the level set. I'm wondering if there isn't a more compact way to refer to these elements- it seems like L.level_sets() [-3:-2][0][i].element.rays()[0][0] is a bit much for just the first coordinate value of the first ray contained in the i-th element of this set.
Ryan On Feb 24, 11:20 pm, Rob Beezer <goo...@beezer.cotse.net> wrote: > This may be the list you want (all one one line if it gets cut up > here): > > indices = [f.element.ambient_ray_indices() for l in L.level_sets() > [-3:-2] for f in l] > > And by "address individually" do you mean indices[0], indices[1], etc? > > Rob > > On Feb 24, 6:48 pm, Ryan Davis <ryan.stance.da...@gmail.com> wrote: > > > > > Greetings, > > > I'm running notebook mode, looking at acyclic directed graphs which > > I'm forming from rational polygon fans -> cone_lattice() command -> > > hasse_diagram() command. One of the things that would be very useful > > would be a command to select only the elements on a specific level > > (say, top minus two). However, I've been checking the sage > > documentation for rational polyhedral fans.cone_lattice(), Directed > > Graphs, and Hasse Diagrams, and no obvious or convenient command to do > > this has emerged. My closest match so far is a double for nesting > > procedure off of fan.cone_lattice().level_sets()[-3:-2] > > > for l in L.level_sets()[-3:-2]: > > print [f.element.ambient_ray_indices() for f in l] > > > but this returns a list of some sort, the elements from which I > > haven't yet been able to address individually (aside from indirectly > > as in the double for). Is there a better command to select these > > elements than this procedure above, and if the procedure is the best > > option available, is there a good way to address the individual > > elements of the resulting list? > > > Thanks in advance, > > Ryan Davis -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org