Graph:...:Repair(3pm)

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

πŸ’– NAME πŸ’–

Graph::Easy::Layout::Repair β€” repair spliced layout with group cells 🧚

okay so bestie, this is the module in the Graph::Easy family (a Perl thing, manual section 3pm, iykyk) and it's lowkey the ✨cosmetic surgery✨ department of graph layout. It splices group cells in and then patches up the damage. slay.


✨ SYNOPSIS ✨

        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 |
        # +------+     +--------+

like. look at that output. Bonn pointing at Berlin with an arrow. it's giving art. it's giving ASCII couture. πŸ’…


🌸 DESCRIPTION 🌸

Graph::Easy::Layout::Repair is the module holding the code that can splice group cells into a layout, and then repair the layout after that step. think of it as the friend who rearranges the whole group photo and then fixes everyone's hair afterwards. iconic behavior honestly.

It's part of Graph::Easy and it gets used automatically β€” so no, you don't have to summon it yourself, it just shows up like the group chat's most reliable member. 🫢


πŸ‘‘ METHODS πŸ‘‘

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

_edges_into_groups()

Put the edges into the appropriate group and class. sorting the edges into their correct little cliques fr fr. πŸŽ€

_assign_ranks()

        $graph->_assign_ranks();

_repair_nodes()

Splicing the rows/columns to add filler cells will have torn holes into multi-edges nodes, so we insert additional filler cells to repair this. 😭 the splicing literally punched holes in your nodes β€” rude β€” so this routine patches them back up with extra filler cells.

_splice_edges()

Splicing the rows/columns to add filler cells might have torn holes into multi-celled edges, so we splice these together again. same energy, but for the multi-celled edges β€” stitch 'em back together bestie. πŸͺ‘

_repair_edges()

Splicing the rows/columns to add filler cells might have put "holes" between an edge start/end and the node cell it points to. This routine fixes this problem by extending the edge by one cell if necessary. so if there's a gap where your arrow should be touching its node, this extends the edge by one cell and closes the gap. periodt. ✨

_fill_group_cells()

After doing a layout(), we need to add the group to each cell based on what group the nearest node is in.

This routine will also find the label cell for each group, and repair edge/node damage done by the splicing. so it does the group-assignment vibe check and the label-cell hunt and the damage control. a triple threat. main character energy only. πŸ”₯


🌈 EXPORT 🌈

Exports nothing. hands empty. zero. not a single symbol. (it's fine, it's not that kind of module, it works behind the scenes like a true backstage legend πŸ’œ)


πŸ¦‹ SEE ALSO πŸ¦‹

  • Graph::Easy β€” the whole reason any of this exists, go read it πŸ’–

πŸ’œ AUTHOR πŸ’œ

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

See the LICENSE file for information.


and that's the whole page bestie!! this was Graph:...:Repair(3pm) from the User Contributed Perl Documentation, shipped with perl v5.36.0, dated 2022-11-20 β€” vintage but still serving ✨ mwah, go forth and let the module repair your layout for you πŸŽ€πŸ’…πŸ«Ά