I would make the function which returns a list a private function and then 
the public function calls the private one and converts it into a 
poset/lattice as overall, I don't like arguments which change the output 
type (and who really wants to deal with passing them along too?).

However, another thing we might want to consider supporting in the long run 
are actual subposets (resp. sublattices), where it is a lightweight parent 
which knows which poset it was created from and passes all necessary data 
up.

Best,
Travis


On Saturday, June 13, 2015 at 8:26:20 AM UTC-7, Johan S. R. Nielsen wrote:
>
> Jori Mäntysalo writes: 
>
> > At least for now we don't have parameter like 
> > trust_me_i_know_what_i_am_doing=True for posets or lattices. 
>
> Such a parameter would make lots of sense, I think. 
>
> > This can be 
> > seen for example with C500=Posets.ChainPoset(500), and after that even 
> > C500.join(100,200) will take few seconds for first time. That means that 
> > ChainPoset() makes a digraph, that is tested to be a poset, then tested 
> to 
> > be a lattice by creating join- an meet-matrix and then those matrices 
> are 
> > thrown away. 
>
> Wow, such terrible performance on trivial examples is surprising to me! 
> Would it make sense to make special sub-classes of FiniteLatticePoset 
> for the special cases, where join, meet, etc. is overwritten? It 
> depends, of course, on what people usually do with lattices (I'm not an 
> expert). 
>
> > (Funnier example is C500.is_lattice() taking few seconds, even if it's 
> > class is lattice.) 
> ??? Why is is_lattice not overwritten by FiniteLatticePoset? 
>
>
> > Yes, if the choises are - and will be - a list and a lattice. But maybe 
> > somebody wants to return a poset or a set? 
>
> A lattice can be trivially converted to a poset or set. So if 
> construction of the lattice object is cheap, with the aforementioned 
> dont-check parameter, then returning a lattice seems better better. 
>
> Johan 
>

-- 
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.

Reply via email to