Graph:...::Disk(3pm)
πΏ Graph::Maker::Disk πΏ
okay bestie, so this is Graph::Maker::Disk, and it lives in the User Contributed Perl Documentation corner of the perl-verse (it's a 3pm page, so it's a module manual, iykyk π«Ά).
β¨ NAME β¨
Graph::Maker::Disk β it creates a graph with nodes positioned in concentric connected rings. literally rings inside rings inside rings. it's giving ripples in a pond π¦
πΈ VERSION πΈ
Version 0.01 β baby's first release, no cap π
π SYNOPSIS π
So what it actually does: it creates a disk graph with init nodes on the first cycle, and disks total cycles. A disk graph is an extension of a wheel (and a wheel is just a disk where disks=1, so like, the humble beginnings β¨) wherein there is a central node, then init node, then 2*init nodes, ... all the way out to 2**disks*init nodes, where each node on an inner cycle connects to 2 nodes on the outer cycle. and if the graph is directed? edges get added in both directions so you end up with an undirected graph. we love a plot twist π
use strict;
use warnings;
use Graph;
use Graph::Maker;
use Graph::Maker::Disk;
my $g = new Graph::Maker('disk', disks => 4, init => 3);
my $arr = $g->get_vertex_attribute(1, 'pos");
print "@$arr\n"; # prints out 0 0
# work with the graph
Because disk graphs are generally associated with geometry, the pos attribute is set for each node, specifying their position (node 1 is at (0,0) and the distance between nodes is 1 unit). coordinates?? in my graph?? it's more likely than you think π
π₯ FUNCTIONS π₯
π new %params
Creates a disk graph with init nodes on the first cycle, and disks total cycles. the required parameters are graph_maker, disks and init (and note the rule: init >= 2 || init == 0 β read it, memorise it, respect it π
). any other params get passed straight onto Graph's constructor, no questions asked.
- if
disksis not given it defaults to0. - if
initis not given it defaults to0. - the vertex attribute
poswill be set to an array reference of the node'sd-dimensional position. yes,d-dimensional. main character geometry π¦ - if
graph_makeris specified it will be called to create theGraphclass as desired (for example if you have a subclass ofGraph), and this defaults to creating aGraphwith the parameters specified.
π AUTHOR π
Matt Spear, "<batman900+cpan at gmail.com>" β say thank you to Matt π«Ά
π BUGS π
Please report any bugs or feature requests to bug-graph-maker-disk 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. so like, you're not screaming into the void, the void will text you back fr fr π
π COPYRIGHT & LICENSE π
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.
quick vibe check bestie: this page isperl v5.32.1, dated2021-08-27, and it's theGraph:...::Disk(3pm)page. go forth and build ur rings, ur disk, ur whole geometric situation. slay πβ¨π
π¦ where this page comes from
- debian bookworm: libgraph-maker-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgraph-maker-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libgraph-maker-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgraph-maker-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgraph-maker-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgraph-maker-perl 0.02-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms