.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Graph::Maker::Bipartite 3pm" .TH Graph::Maker::Bipartite 3pm "2021-08-27" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Graph::Maker::Bipartite \- Creates a bipartite graph with a given distribution. .SH "VERSION" .IX Header "VERSION" Version 0.01 .SH "SYNOPSIS" .IX Header "SYNOPSIS" Creates a bipartite graph with the given distributions. A bipartite graph is one in which it can be decomposed into two unique sets with edges only between these sets. If the graph is directed then edges are added in both directions to create an undirected graph. .PP .Vb 5 \& use strict; \& use warnings; \& use Graph; \& use Graph::Maker; \& use Graph::Maker::Bipartite; \& \& my (@a, @b); \& @a = (2); @b = (1,1); \& $g = new Graph::Maker(\*(Aqbipartite\*(Aq, N1 => 5, N2 => 4, seq1 => [@a], seq2 => [@b], undirected => 1); \& @a = (2,3,1,2,1); @b = (2,2,1,3,1); \& $g2 = new Graph::Maker(\*(Aqbipartite\*(Aq, seq1 => [@a], seq2 => [@b]); \& @a = (2,3,1,2,1); @b = (2,2,1,3,1); \& $g3 = new Graph::Maker(\*(Aqbipartite\*(Aq, seq1 => [@a], seq2 => [@b], strict => 1, undirected => 1); \& # This distribution cannot be satisfied and the resulting graph will be incorrect \& @a = (2); @b = (2); \& eval { \& $g = new Graph::Maker(\*(Aqbipartite\*(Aq, N1 => 5, N2 => 4, seq1 => [@a], seq2 => [@b], undirected => 1); \& }; \& # $@ has a message informing the graph could not be constructed \& # work with the graph .Ve .SH "FUNCTIONS" .IX Header "FUNCTIONS" .ie n .SS "new %params" .el .SS "new \f(CW%params\fP" .IX Subsection "new %params" Creates a bipartite graph with the given distributions (seq1 and seq2 respectively) with sets of size N1 and N2 respectfully. The recognized parameters are graph_maker, N1, N2, seq1, and seq2. any others are passed onto Graph's constructor. If N1 is not given it is assumed to be the length of seq1, same for N2. If N1 (N2) is greater than seq1 (seq2) then the remaining values are assumed to be zero. If strict is set then uses a deterministic algorithm to ensure (if possible) the correct degree distribution, otherwise it is not guarenteed that it will have the exact distribution specified. If graph_maker is specified it will be called to create the Graph class as desired (for example if you have a subclass of Graph), this defaults to create a Graph with the parameters specified. Will croak if strict is turned on and it is unable to create a graph with the given degree sequences with the message \&\*(L"Could not build a graph with the requested sequences (seq1), (seq2)\*(R". .SH "AUTHOR" .IX Header "AUTHOR" Matt Spear, \f(CW\*(C`\*(C'\fR .SH "BUGS" .IX Header "BUGS" Quite possibly, but hopefully not. .PP Please report any bugs or feature requests to \&\f(CW\*(C`bug\-graph\-maker\-randombipartite at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2008 Matt Spear, all rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.