Graph:...::Wheel(3pm)

πŸ’– Graph::Maker::Wheel πŸ’–

okay bestie, buckle up, we're doing a User Contributed Perl Documentation page and it's giving graph theory but make it cute. This one's about Graph::Maker::Wheel, no cap. 🎑✨


🌸 NAME 🌸

Graph::Maker::Wheel β€” literally just creates a wheel graph. that's the whole job. she's a simple queen. πŸ‘‘


✨ VERSION ✨

Version 0.01, babes. brand new, fresh out the box. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

So the vibe is: you tell it how many nodes you want, and it hands you back a wheel graph. And what even is a wheel graph, you ask? It's a star graph where all the outer nodes get connected to each other in a cycle. like a star that decided to become a friendship bracelet. 🫢

Oh and heads up: if the graph is directed, then edges get added in both directions, which effectively makes it an undirected graph anyway. the way that it just refuses to be one-way... iconic behavior tbh. πŸ’…

use strict;
use warnings;
use Graph;
use Graph::Maker;
use Graph::Maker::Wheel;

my $g = new Graph::Maker('wheel', N => 10, undirected => 1);
# work with the graph

πŸ”₯ FUNCTIONS πŸ”₯

🌈 new %params

Creates a wheel graph with however many nodes you asked for. simple as that, fr fr.

The recognized parameters are:

  • N β€” your node count. if you don't give it an N, it defaults to 0 (so like, nothing. an empty little void wheel. 😭)
  • graph_maker β€” if you specify this, it gets called to create the Graph class exactly how you want it (for example, if you've got your own subclass of Graph, this is your moment, main character energy ✨). if you don't pass it, it just defaults to creating a regular Graph with the parameters you specified.

and any other params you throw in? they get passed straight onto Graph's constructor. no gatekeeping here. πŸ’œ


πŸŽ€ AUTHOR πŸŽ€

Matt Spear, <batman900+cpan at gmail.com> πŸ¦‡ (yes the email is a batman reference, we love that for him)


πŸ’€ BUGS πŸ’€

Found a bug? Want a feature? Please report it, bestie, don't just suffer in silence πŸ™ˆ:

I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. it's a whole little notification situationship. πŸ””πŸ’•


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.


🧚 SEE YA 🧚

and that's the whole page, periodt. πŸ’…

cute little sign-off moment: this was generated by perl v5.32.1 on 2021-08-27, and it belongs to the Graph:...::Wheel(3pm) family of docs. go build some wheels, bestie, you're gonna slay. πŸŒŸπŸŽ‘πŸ’–

πŸ“¦ where this page comes from