> > > I would be interested to know how. Do you use it yourself ? > > I have used it, although I wasn't using the fact it returned a Partition instance.
> > but I'm not opposed to renaming it to something > > like connected_components_partition. > > As Vincent said, 'connected_components_partition' sounds like it will > return a partition of the vertex set into connected components, i.e. what > 'connected_components' already does. If you do not like the > 'connected_components_sizes_partition' I proposed, could you give us an > other possible name for this method that would more explicit than > 'to_partition' ? > I'd be okay with that (although it is somewhat long). > > > Similar for to_graph. > > I do not understand what you mean by 'similar'. I tried to explain in my > first post how the behaviour of this function was not clear from its name, > and how renaming it would make it almost a copy of a function that already > exist. Also, if you want the graph corresponding to the hasse diagram, it > is perfectly natural to do Graph(P.hasse_diagram()). > You're saying remove the method because you can replace it with a short 1-line statement with that last sentence. > > If you believe that this function should be renamed instead of removed, > could you say how ? I am especially interested in understanding why you > believe that it is useful as a function of its own, when > Graph(P.hasse_diagram()) or P.hasse_diagram().to_undirected() seem both > natural and concise. > It depends on how you think of posets. I don't naturally think of them as directed graphs, so I wouldn't a priori know that I could plug it into Graph. IMO putting descriptions in the docstrings is sufficient. So I don't think a different name is needed, but I'm not opposed to renaming it. > > What I want to avoid, however, is that the name of functions might be > confusing to graph theorists. The same way that I hope that the name of > graph functions is not confusing to non graph theorists. > > I think we can only hope for so much with the names themselves as certain words are often overloaded from different areas of math and we don't want 40+ character function names. Again, if you can think of a better, go ahead and change it. Travis -- You received this message because you are subscribed to the Google Groups "sage-devel" 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-devel. For more options, visit https://groups.google.com/d/optout.
