#14105: all_graph_colorings should have an option to use integer colors.
--------------------------------------+-------------------------------------
Reporter: rowland | Owner: jason, ncohen, rlm
Type: enhancement | Status: new
Priority: minor | Milestone: sage-5.8
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: chrisjamesberg
Authors: ahmorales, rowland | Merged in:
Dependencies: | Stopgaps:
--------------------------------------+-------------------------------------
Description changed by ncohen:
Old description:
> This is ugly:
>
> sage: from sage.graphs.graph_coloring import all_graph_colorings
> sage: g = Graph([[0, 1], [1, 2]])
> sage: list(all_graph_colorings(g, 3))
> [{'#00ff00': [1], '#ff0000': [0, 2]}, {'#00ff00': [1], '#ff0000': [0],
> '#0000ff': [2]}, {'#0000ff': [1], '#ff0000': [0, 2]}, {'#0000ff': [1],
> '#ff0000': [0], '#00ff00': [2]}, {'#ff0000': [1], '#00ff00': [0, 2]},
> {'#ff0000': [1], '#00ff00': [0], '#0000ff': [2]}, {'#0000ff': [1],
> '#ff0000': [2], '#00ff00': [0]}, {'#0000ff': [1], '#00ff00': [0, 2]},
> {'#ff0000': [1], '#0000ff': [0], '#00ff00': [2]}, {'#ff0000': [1],
> '#0000ff': [0, 2]}, {'#00ff00': [1], '#ff0000': [2], '#0000ff': [0]},
> {'#00ff00': [1], '#0000ff': [0, 2]}]
New description:
This is ugly:
{{{
sage: from sage.graphs.graph_coloring import all_graph_colorings
sage: g = Graph([[0, 1], [1, 2]])
sage: list(all_graph_colorings(g, 3))
[{'#00ff00': [1], '#ff0000': [0, 2]}, {'#00ff00': [1], '#ff0000': [0],
'#0000ff': [2]}, {'#0000ff': [1], '#ff0000': [0, 2]}, {'#0000ff': [1],
'#ff0000': [0], '#00ff00': [2]}, {'#ff0000': [1], '#00ff00': [0, 2]},
{'#ff0000': [1], '#00ff00': [0], '#0000ff': [2]}, {'#0000ff': [1],
'#ff0000': [2], '#00ff00': [0]}, {'#0000ff': [1], '#00ff00': [0, 2]},
{'#ff0000': [1], '#0000ff': [0], '#00ff00': [2]}, {'#ff0000': [1],
'#0000ff': [0, 2]}, {'#00ff00': [1], '#ff0000': [2], '#0000ff': [0]},
{'#00ff00': [1], '#0000ff': [0, 2]}]
}}}
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14105#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.