Hello ! > And .is_exact(). But to be honest, at the end of documentation of > .base_ring() it says "Todo Move this method elsewhere - -".
"git blame" will tell you that these things are here since around 2008. The message has been written in #10963 though. > Thinking more about (possible) logic behind this... > > - Is it meant to be possible to totally change backend? Not just to hasse > diagram with some other graph backend, but to some bit vector or > matrix-based system or something? HMmmm... Well for some things it may be much better to have a binary matrix indeed, for instance when you need to compare a lot of elements and would like to store the dense version of the adjacency matrix. Right now it is not possble for all I know. And if what you have in mind can also be thought of as a graph backend, then perhaps nothing needs to be changed on the Poset side. Translating the elements' name into integers may be what takes the most time though. It depends. > - It might make sense to have functions for ALL posets, not just finite > ones. Then maybe poset class could have is_lattice defined as > is_meet_semilattice & is_join_semilattice? However, for now there is just > two infinite poset defined. Well, the current class is called FinitePoset. Some "Poset" class could do that. I did not know that infinite posets were supported though. > - Hasse diagram is backend to posets and [semi]lattices. Could some function > be used differently, like omitting some checks if we have lattice and not > just poset? I suppose, but those functions can be implemented in FiniteLattice already. I believe you did that in a recent patch by the way. > About using hasse diagrams directly: Is it possible to do for example > Posets.ChainPoset(500) without 10 seconds of cpu time? That such a thing takes so long does not make the slightest sense. "%prun -s cumulative" says that a call to "copy" takes a lot of time, and the call to 'meet' too. But whatever is called is clearly wasting ressouces. sage: %time posets.ChainPoset(500) CPU times: user 7.65 s, sys: 64 ms, total: 7.71 s Wall time: 7.62 s Finite lattice containing 500 elements sage: %time digraphs.Path(500) CPU times: user 0 ns, sys: 0 ns, total: 0 ns Wall time: 1.26 ms Path: Digraph on 500 vertices 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 [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.
