Graph:...:Layout(3pm)

πŸ“¦
version 0.76 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ Graph:...:Layout(3pm) ✨

okay bestie, so this is a User Contributed Perl Documentation page, and it's all about the little engine that could for laying out your graphs πŸ’…


🌸 NAME 🌸

Graph::Easy::Layout β€” it does the layout of the graph from Graph::Easy, that's the whole job, no cap πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

like, here's the vibe in action:

        use Graph::Easy;

        my $graph = Graph::Easy->new();

        my $bonn = Graph::Easy::Node->new(
                name => 'Bonn',
        );
        my $berlin = Graph::Easy::Node->new(
                name => 'Berlin',
        );

        $graph->add_edge ($bonn, $berlin);

        $graph->layout();

        print $graph->as_ascii( );

        # prints:

        # +------+     +--------+
        # | Bonn | --> | Berlin |
        # +------+     +--------+

look at that arrow go 😭 she's so pretty


πŸŽ€ DESCRIPTION πŸŽ€

Graph::Easy::Layout contains just the actual layout code for Graph::Easy. like, that's it. that's the girl. she doesn't do the parsing, she doesn't do the rendering, she does the laying out. main character energy but specifically for coordinates ✨


πŸ’œ METHODS πŸ’œ

Graph::Easy::Layout injects the following methods into the Graph::Easy namespace:

🌈 layout()

        $graph->layout();

layouts the actual graph. the real one. the graph itself. go off πŸ‘‘

πŸ“ _assign_ranks()

        $graph->_assign_ranks();

used by layout() to assign each node a rank, so they can be sorted and grouped on those. ranking them up fr fr πŸ“Š

🧚 _optimize_layout

used by layout() to optimize the layout as a last step. the final glow-up at the end of the makeover montage πŸ’–


⭐ EXPORT ⭐

exports nothing. she gives nothing away, she's mysterious like that πŸ™ˆ


🌸 SEE ALSO 🌸

Graph::Easy.


πŸ‘‘ AUTHOR πŸ‘‘

Copyright (C) 2004 - 2008 by Tels <http://bloodgate.com>

see the LICENSE file for information.


and that's the whole page bestie, slay πŸ’…βœ¨

sign-off time: this was perl v5.36.0, dated 2022-11-20, and yes the footer says it again β€” Graph:...:Layout(3pm). iconic. periodt 🫢🌈