Hello ! > I have used it, although I wasn't using the fact it returned a Partition > instance.
Oh. So what you needed was actually map(len, G.connected_components()). Well, this functon has been added in order to return a partition (this the name _to_partition), and this is one thing I find no good explanation for. > I'd be okay with that (although it is somewhat long). It is somewhat long and uncomfortable. I would prefer to remove it myself, but if this is the only middle ground then let it be. >> 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. While it can indeed be rewritten with a short 1-line, and while I gave this 1-line repeatedly, please do not reduce my whole argumentation to that. The reason why I believe that this function should be removed is that I find its name unclear, as I explained in my first post on the subject. In order to fix this problem, I believe that the name this function could be renamed to should contain both ('undirected' or 'Graph') as well as Hasse Diagram. This would give something like Poset.undirected_hasse_diagram; or Poset.hasse_diagram_undirected; or Poset.hasse_diagram_graph, none of which offers any simplification with respect to the already available alternatives, i.e.: - Graph(Poset.hasse_diagram()) - Poset.hasse_diagram().to_undirected() Because it needs to be renamed, and because all names I can think of offer no advantage over already available alternatives, I believe that this function should be removed. > 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. This is the key point: there is indeed no unique Graph associated to a Poset, which is probably the reason why the two of them are not 'naturally associated' for you. Indeed, I oppose both Graph(Poset) and Poset.to_graph(), as equally unclear. While there is no 'uniquely determined' poset associated to a Poset, there is a notion of Hasse Diagram, which is directed. To this directed graph we can naturally associate an undirected graph, and this I believe is the best way to obtain the desired result. It is faithfully represented by the two commands I mentionned. > 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. We are not as desperate as you say. Besides, the problem with to_graph has nothing to do with long names. > Again, if you can think of a better, go ahead > and change it. I do not have one. I still defend that Poset.to_graph should be removed for the reasons I gave above. Do you find them unfair on some respect ? I am eager to see this matter solved. Nathann -- 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 sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.