Graph:...:Repair(3pm)
π 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 ππ
π«Ά
π¦ where this page comes from
- debian bookworm: libgraph-easy-perl 0.76-3 Β· GPL-2.0-or-later
- debian trixie: libgraph-easy-perl 0.76-3 Β· GPL-2.0-or-later
- ubuntu noble: libgraph-easy-perl 0.76-3 Β· GPL-2.0-or-later
- ubuntu resolute: libgraph-easy-perl 0.76-3 Β· GPL-2.0-or-later
- ubuntu stonking: libgraph-easy-perl 0.76-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms