From 0a33cf3eea05987efead158510b8bbd34d42c48c Mon Sep 17 00:00:00 2001 From: dcoudert Date: Wed, 3 Aug 2022 16:53:08 +0200 Subject: [PATCH] trac #34211: reduce verbosity of some doctests --- src/sage/graphs/isgci.py | 59 ++++++++-------------------------------- 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/src/sage/graphs/isgci.py b/src/sage/graphs/isgci.py index 2319df40fe2..294c905d225 100644 --- a/src/sage/graphs/isgci.py +++ b/src/sage/graphs/isgci.py @@ -55,30 +55,13 @@ ------------------------- id : gc_32 name : chordal - type : base - + ... Problems : ----------- 3-Colourability : Linear Clique : Polynomial Clique cover : Polynomial - Cliquewidth : Unbounded - Cliquewidth expression : NP-complete - Colourability : Linear - Cutwidth : NP-complete - Domination : NP-complete - Feedback vertex set : Polynomial - Hamiltonian cycle : NP-complete - Hamiltonian path : NP-complete - Independent set : Linear - Maximum bisection : Unknown - Maximum cut : NP-complete - Minimum bisection : Unknown - Recognition : Linear - Treewidth : Polynomial - Weighted clique : Polynomial - Weighted feedback vertex set : Unknown - Weighted independent set : Linear + ... It is possible to obtain the complete list of the classes stored in ISGCI by calling the :meth:`~GraphClasses.show_all` method (beware -- long output):: @@ -637,30 +620,15 @@ def description(self): ------------------------- id : gc_32 name : chordal - type : base - + ... Problems : ----------- 3-Colourability : Linear Clique : Polynomial Clique cover : Polynomial - Cliquewidth : Unbounded - Cliquewidth expression : NP-complete - Colourability : Linear - Cutwidth : NP-complete - Domination : NP-complete - Feedback vertex set : Polynomial - Hamiltonian cycle : NP-complete - Hamiltonian path : NP-complete - Independent set : Linear - Maximum bisection : Unknown - Maximum cut : NP-complete - Minimum bisection : Unknown + ... Recognition : Linear - Treewidth : Polynomial - Weighted clique : Polynomial - Weighted feedback vertex set : Unknown - Weighted independent set : Linear + ... """ classes = GraphClasses().classes() cls = classes[self._gc_id] @@ -737,7 +705,7 @@ def classes(self): sage: type(t) <... 'dict'> sage: sorted(t["gc_151"].keys()) - ['id', 'name', 'problem', 'type'] + ['id', 'name',... 'problem',... 'type'] sage: t["gc_151"]['name'] 'cograph' sage: t["gc_151"]['problem']['Clique'] @@ -780,16 +748,14 @@ def smallgraphs(self): EXAMPLES:: sage: t = graph_classes.smallgraphs() - sage: t - {'2C_4': Graph on 8 vertices, - '2K_2': Graph on 4 vertices, - '2K_3': Graph on 6 vertices, - '2K_3 + e': Graph on 6 vertices, - '2K_4': Graph on 8 vertices, - '2P_3': Graph on 6 vertices, - ... + sage: t['2C_4'] + Graph on 8 vertices + sage: t['2K_3 + e'] + Graph on 6 vertices sage: t['fish'] Graph on 6 vertices + sage: t['bull'] + Graph on 5 vertices """ self._get_ISGCI() return self.smallgraphs() @@ -1041,7 +1007,6 @@ def _XML_to_dict(root): ------------------------- id : gc_56 name : perfect - type : base ... """ ans = root.attrib.copy()