Graph:...::Utils(3pm)

✨ Graph::Maker::Utils β€” the lil helper bestie of Graph::Maker πŸ’…

okay so this is Graph::Maker::Utils from the User Contributed Perl Documentation, a.k.a. the little toolbox of tiny routines that all the Graph::Maker::* modules lean on. it's giving backstage crew at the graph-making concert, fr fr πŸŽ€


🌸 VERSION

Version 0.02 β€” babes we are EARLY days, this is basically a vintage icon πŸ‘‘


✨ SYNOPSIS

so here's the vibe: some utility functions for Graphs. that's it, that's the pitch πŸ’–

use strict;
use warnings;
use Graph::Maker;
use Graph::Maker::Linear;
use Graph::Maker::Utils qw/is_valid_degree_seq cartesian_product/;

my @seq = (2, 1, 1);
my $bool = is_valid_degree_seq(@seq); # returns true
my @se2 = (2, 1, 1, 1)
my $boo2 = is_valid_degree_seq(@se2); # returns false

my $g1 = new Graph::Maker('linear', N => 10);
my $g2 = new Graph::Maker('linear', N => 10);
my $g = cartesian_product($g1, $g2); # returns the 2-dimensional plane

like look at (2, 1, 1) β€” valid, true, slay. and then (2, 1, 1, 1) β€” false, nope, not today. the degree sequence said what it said and it said no πŸ™ˆ and then two linear graphs get smooshed together into a whole 2-dimensional plane. main character behaviour honestly 🌈


πŸ¦‹ EXPORT

Nothing by default, bestie β€” you gotta be specific. specify any set of functions you want, or just hit it with :all to import everything 😌


πŸ’œ FUNCTIONS

🧚 cartesian_product $g, $h

Creates a new graph that is the cartesian product of $g and $h. for example, the cartesian product of two linear graphs is a grid graph. yes queen, that's the whole glow-up ✨

🌸 is_valid_degree_seq @seq

Tests if @seq is a valid degree sequence, that is, if it can actually be used to generate a graph. This is mainly used in other Graph::Maker packages, so like, it's the quiet helper doing the real work behind the scenes 🫢


πŸ’… AUTHOR

Matt Spear, "<batman900+cpan at gmail.com>" β€” the legend, the moment, the icon πŸ‘‘


πŸ’€ BUGS

okay so if something's broken (and 😭 we've all been there), please report any bugs or feature requests to "bug-graph-maker-smallworldws at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Graph-Maker>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. like, you get updates, that's the customer service bestie ✨


πŸŽ€ ACKNOWLEDGEMENTS

This package owes a lot to NetworkX. no cap, huge inspiration energy πŸ™


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. periodt πŸ’œ


and that's the whole page, bestie! 🫢

sign-off time, and it's cute so listen up: this lil doc came out of perl v5.32.1, dated 2021-08-27, and yeah β€” the manual name up top is Graph:...::Utils(3pm) because the pretty little title wouldn't fit in the header. iconic behaviour honestly, we stan a truncated title πŸ’–βœ¨

πŸ“¦ where this page comes from