id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
17804 Cleanup of sage.graphs.pq_trees ncohen "While fixing the bug reported at #17787, I noticed several things in `sage.graphs.pq_trees` that should be cleaned. Some misnamed functions, hard-to-read documentation, and also a couple of simple but useful missing features that can be very helpful when debugging code.
This branch consists of several commits which do the following:
- Rename `.cardinality` to `.number_of_children`: the `PQ`-trees encode a set of permutations, and the 'cardinality' function should represent that, instead of what it represents now.
- Add a real `.cardinality` function, which can be used to compute the number of different representations of an interval graph
- Add a `.orderings` function, which lists all possibles representations of an interval graph
- remove `.is_P` and `.is_Q`. These functions were barely used in the code itself, and can be replaced with `isinstance(x,P)` and `isinstance(x,Q)`.
- Move the documentation of class PQ-tree, which actually explains how the main algorithm works, into the module's doc. It is also rewritten, and hopefully easier to understand.
- Some one-line changes that improve readability or add links.
Nathann" enhancement closed major sage-6.6 graph theory fixed dcoudert dimpase Nathann Cohen David Coudert N/A 07ca59dfb8deb9553c4ed9e1ea79a6a394026334 07ca59dfb8deb9553c4ed9e1ea79a6a394026334