Graph:...Barbell(3pm)

πŸ’– Graph::Maker::Barbell πŸ’–

okay bestie, so this is Graph::Maker::Barbell, a lil User Contributed Perl Documentation situation, and it makes barbell graphs. yes like the gym thing. no you don't have to lift anything. πŸ‹οΈβœ¨


✨ VERSION ✨

Version 0.01 β€” baby's first release, and she's serving πŸŽ€


🌸 SYNOPSIS 🌸

so what she does is: she creates the barbell graph with N1 nodes on the left, N1 nodes on the right, and N2 nodes in the center bar. and like, what even is a barbell graph? bestie I got you: it's a graph where there are two fully-connected components of size N1 and they're connected by a single bridge of N2 nodes. it's giving two friend groups and one (1) mutual who knows everybody. iconic. πŸ’…

also important: if the graph is directed, then edges get added in both directions to create an undirected graph. so she matches the vibe both ways, no cap.

use strict;
use warnings;
use Graph;
use Graph::Maker;
use Graph::Maker::Barbell;

my $g = new Graph::Maker('barbell', N1 => 4, N2 => 2);
# work with the graph

πŸ¦‹ FUNCTIONS πŸ¦‹

πŸ’œ new %params

creates the barbell graph with N1 nodes on the left and right and N2 nodes in the center bar. (yes the original sentence just ends with a comma there. we respect the comma. the comma is part of the lore. 🫢)

the recognized parameters are graph_maker, N1 and N2. any others get passed onto Graph's constructor, no questions asked.

  • if N1 is not given, it defaults to 0
  • if N2 is not given, it defaults to 0
  • if graph_maker is specified, it will be called to create the Graph class as desired β€” like if you have a subclass of Graph, that's your moment β€” and it defaults to creating a Graph with the parameters specified

🌈 AUTHOR 🌈

Matt Spear, <batman900+cpan at gmail.com> β€” shoutout to the author, main character energy fr fr πŸ‘‘


πŸ’€ BUGS πŸ’€

None at the moment... she's flawless, she said so herself 😌✨

but if you do find something, please report any bugs or feature requests to bug-graph-maker-barbell at rt.cpan.org, or through the web interface at:

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Graph-Maker

the author will be notified, and then you'll automatically be notified of progress on your bug as changes get made. full loop, closed communication, we love to see it 🫢


Copyright 2008 Matt Spear, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so like, do your thing, just keep it Perl-flavored πŸ’–


and that's the whole page bestie!! this was perl v5.32.1, dated 2021-08-27, and yes that header and footer were giving Graph:...Barbell(3pm) the whole time, we just folded the vibe in. mwah πŸ’‹ go build a barbell graph, you got this 🌟

πŸ“¦ where this page comes from