in reply to Re: Graph labeling problem
in thread Graph labeling problem

You'd probably be better off using the Graph module rather than rolling your own?

Replies are listed 'Best First'.
Re^3: Graph labeling problem
by LanX (Saint) on Feb 20, 2022 at 15:53 UTC
    Could you please elaborate how?

    There is no mention of colo(u)r in the whole POD of Graph

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Because then there is no need to write one's own add_edges etc. Graph does not have colouring methods for now, but pull-requests adding them (ideally with tests) are always welcome.
        > but pull-requests adding them (ideally with tests) are always welcome.

        Graph coloring is a vast field, IMHO this would need to be addressed in an extra module.

        I was lucky to find a satisfying optimal solution, but only for the edge coloring of complete graphs (like requested by the OP)

        This edge-case (sic ;) can hardly be included in your very general module.

        And there is no easy generalization, according to WP is the general case of an optimal coloring known to be NP-hard.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery