On Thu, 21 Jan 2016, Nathann Cohen wrote:

Right now the development is designed in what I think is a really
senseless way: every features requires two new functions:
- One on HasseDiagram which does the job
- One on Poset which calls it

We may have a situation where implementation needs functions f, g and h, and "interface" is something like def do_a(x): f(g(x)) and def do_b(x): g(h(x)). (Example: maximal_sublattices() and frattini_sublattice()).

But even then the question remains: why a class for the Hasse diagram? I.e. Poset could have a variable _hasse_diagram of type DiGraph. Then Poset would have _f(x), _g(x) and so on as an implementation.

For example minimal_elements() of a Poset is just a sources() of DiGraph wrapped. Do we need two-phase wrapper?

--
Jori Mäntysalo

Reply via email to