diff --git a/lib/perl/lib/perl5/Graph/Easy.pm b/lib/perl/lib/perl5/Graph/Easy.pm index dad936861b8814a680040790b03bf2e4253e01e0..aa712343f6674e571d373c66ac639ab54f5e3724 100644 --- a/lib/perl/lib/perl5/Graph/Easy.pm +++ b/lib/perl/lib/perl5/Graph/Easy.pm @@ -17,7 +17,7 @@ use Graph::Easy::Node::Anon; use Graph::Easy::Node::Empty; use Scalar::Util qw/weaken/; -$VERSION = '0.70'; +$VERSION = '0.71'; @ISA = qw/Graph::Easy::Base/; use strict; diff --git a/lib/perl/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Graph/Easy/.packlist b/lib/perl/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Graph/Easy/.packlist index 2053aba176b831265c95398cf13f065982c62d92..5c3b020c71b8a41ccacd4b9e558afe8f3cec92b3 100644 --- a/lib/perl/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Graph/Easy/.packlist +++ b/lib/perl/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Graph/Easy/.packlist @@ -26,31 +26,31 @@ /home/aflit001/lib/perl/lib/perl5/Graph/Easy/Parser.pm /home/aflit001/lib/perl/lib/perl5/Graph/Easy/Parser/Graphviz.pm /home/aflit001/lib/perl/lib/perl5/Graph/Easy/Parser/VCG.pm -/home/aflit001/share/man/man1/graph-easy.1p -/home/aflit001/share/man/man3/Graph::Easy.3pm -/home/aflit001/share/man/man3/Graph::Easy::As_ascii.3pm -/home/aflit001/share/man/man3/Graph::Easy::As_graphml.3pm -/home/aflit001/share/man/man3/Graph::Easy::As_graphviz.3pm -/home/aflit001/share/man/man3/Graph::Easy::As_txt.3pm -/home/aflit001/share/man/man3/Graph::Easy::As_vcg.3pm -/home/aflit001/share/man/man3/Graph::Easy::Attributes.3pm -/home/aflit001/share/man/man3/Graph::Easy::Base.3pm -/home/aflit001/share/man/man3/Graph::Easy::Edge.3pm -/home/aflit001/share/man/man3/Graph::Easy::Edge::Cell.3pm -/home/aflit001/share/man/man3/Graph::Easy::Group.3pm -/home/aflit001/share/man/man3/Graph::Easy::Group::Anon.3pm -/home/aflit001/share/man/man3/Graph::Easy::Group::Cell.3pm -/home/aflit001/share/man/man3/Graph::Easy::Layout.3pm -/home/aflit001/share/man/man3/Graph::Easy::Layout::Chain.3pm -/home/aflit001/share/man/man3/Graph::Easy::Layout::Force.3pm -/home/aflit001/share/man/man3/Graph::Easy::Layout::Grid.3pm -/home/aflit001/share/man/man3/Graph::Easy::Layout::Path.3pm -/home/aflit001/share/man/man3/Graph::Easy::Layout::Repair.3pm -/home/aflit001/share/man/man3/Graph::Easy::Layout::Scout.3pm -/home/aflit001/share/man/man3/Graph::Easy::Node.3pm -/home/aflit001/share/man/man3/Graph::Easy::Node::Anon.3pm -/home/aflit001/share/man/man3/Graph::Easy::Node::Cell.3pm -/home/aflit001/share/man/man3/Graph::Easy::Node::Empty.3pm -/home/aflit001/share/man/man3/Graph::Easy::Parser.3pm -/home/aflit001/share/man/man3/Graph::Easy::Parser::Graphviz.3pm -/home/aflit001/share/man/man3/Graph::Easy::Parser::VCG.3pm +/home/aflit001/lib/perl/man/man1/graph-easy.1p +/home/aflit001/lib/perl/man/man3/Graph::Easy.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::As_ascii.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::As_graphml.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::As_graphviz.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::As_txt.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::As_vcg.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Attributes.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Base.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Edge.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Edge::Cell.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Group.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Group::Anon.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Group::Cell.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Layout.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Layout::Chain.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Layout::Force.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Layout::Grid.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Layout::Path.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Layout::Repair.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Layout::Scout.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Node.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Node::Anon.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Node::Cell.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Node::Empty.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Parser.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Parser::Graphviz.3pm +/home/aflit001/lib/perl/man/man3/Graph::Easy::Parser::VCG.3pm diff --git a/lib/perl/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod b/lib/perl/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod index 2783837505471d6d08bb2e939332040fd44e21e3..0e49f7704c9d3d54a681e7ca764b1ada75cdd6ee 100644 --- a/lib/perl/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +++ b/lib/perl/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod @@ -1736,3 +1736,25 @@ C<EXE_FILES: scripts/cpan> =back +=head2 Tue Mar 6 16:13:53 2012: C<Module> L<Graph::Easy|Graph::Easy> + +=over 4 + +=item * + +C<installed into: /home/aflit001/lib/perl/lib/perl5> + +=item * + +C<LINKTYPE: dynamic> + +=item * + +C<VERSION: 0.71> + +=item * + +C<EXE_FILES: bin/graph-easy> + +=back + diff --git a/lib/perl/man/man1/graph-easy.1p b/lib/perl/man/man1/graph-easy.1p new file mode 100644 index 0000000000000000000000000000000000000000..8bc182372781805101aeaf7cd3adf4e688d8bc4a --- /dev/null +++ b/lib/perl/man/man1/graph-easy.1p @@ -0,0 +1,493 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "GRAPH-EASY 1" +.TH GRAPH-EASY 1 "2011-12-23" "perl v5.12.4" "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\-easy \- render/convert graphs in/from various formats +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +Convert between graph formats and layout/render graphs: +.PP +.Vb 1 +\& graph\-easy [options] [inputfile [outputfile]] +\& +\& echo "[ Bonn ] \- car \-> [ Berlin ]" | graph\-easy +\& graph\-easy \-\-input=graph.dot \-\-as_ascii +\& graph\-easy \-\-html \-\-output=mygraph.html graph.txt +\& graph\-easy graph.txt graph.svg +\& graph\-easy graph.txt \-\-as_dot | dot \-Tpng \-o graph.png +\& graph\-easy graph.txt \-\-png +\& graph\-easy graph.vcg \-\-dot +\& graph\-easy graph.dot \-\-gdl +\& graph\-easy graph.dot \-\-graphml +.Ve +.SH "ARGUMENTS" +.IX Header "ARGUMENTS" +Here are the most important options, more are listed in the full +documentation: +.IP "\-\-help" 10 +.IX Item "--help" +Print the full documentation, not just this short overview. +.IP "\-\-input" 10 +.IX Item "--input" +Specify the input file name. Example: +.Sp +.Vb 1 +\& graph\-easy \-\-input=input.txt +.Ve +.Sp +The format will be auto-detected, override it with \-\-from. +.IP "\-\-output" 10 +.IX Item "--output" +Specify the output file name. Example: +.Sp +.Vb 1 +\& graph\-easy \-\-output=output.txt input.txt +.Ve +.IP "\-\-as" 10 +.IX Item "--as" +Specify the output format. Example: +.Sp +.Vb 1 +\& graph\-easy \-\-as=ascii input.txt +.Ve +.Sp +Valid formats are: +.Sp +.Vb 10 +\& ascii ASCII art rendering +\& boxart Unicode Boxart rendering +\& html HTML +\& svg Scalable Vector Graphics +\& graphviz the DOT language +\& dot alias for "graphviz" +\& txt Graph::Easy text +\& vcg VCG (Visualizing Compiler Graphs \- a subset of GDL) text +\& gdl GDL (Graph Description Language) text +\& graphml GraphML +.Ve +.Sp +In addition, the following formats are understood and piped through the program +specified with the \-\-renderer option (default: dot): +.Sp +.Vb 11 +\& bmp Windows bitmap +\& gif GIF +\& hpgl HP\-GL/2 vector graphic +\& jpg JPEG +\& pcl PCL printer language +\& pdf PDF +\& png PNG +\& ps Postscript +\& ps2 Postscript with PDF notations (see graphviz documentation) +\& tga Targa bitmap +\& tif TIFF bitmap +.Ve +.Sp +The default format will be determined by the output filename extension, +and is \f(CW\*(C`ascii\*(C'\fR, if the output filename was not set. +.Sp +You can also use \fB\s-1ONE\s0\fR argument of the form \f(CW\*(C`\-\-as_ascii\*(C'\fR or \f(CW\*(C`\-\-ascii\*(C'\fR. +.IP "\-\-from" 10 +.IX Item "--from" +Specify the input format. Valid formats are: +.Sp +.Vb 4 +\& graphviz the DOT language +\& txt Graph::Easy text +\& vcg VCG text +\& gdl GDL (Graph Description Language) text +.Ve +.Sp +If not specified, the input format is auto-detected. +.Sp +You can also use \fB\s-1ONE\s0\fR argument of the form \f(CW\*(C`\-\-from_dot\*(C'\fR, etc. +.IP "\-\-renderer" 10 +.IX Item "--renderer" +The external program (default: \*(L"dot\*(R") used to render the output +formats like \f(CW\*(C`png\*(C'\fR, \f(CW\*(C`jpg\*(C'\fR etc. Some choices are \*(L"neato\*(R", \*(L"twopi\*(R", \*(L"fdp\*(R" or \*(L"circo\*(R". +.IP "\-\-parse" 10 +.IX Item "--parse" +Input will only be parsed, without any output generation. +Useful in combination with \f(CW\*(C`\-\-debug=1\*(C'\fR or \f(CW\*(C`\-\-stats\*(C'\fR. Example: +.Sp +.Vb 1 +\& graph\-easy input.txt \-\-parse \-\-debug=1 +.Ve +.IP "\-\-stats" 10 +.IX Item "--stats" +Write various statistics about the input graph to \s-1STDERR\s0. Best used in +combination with \f(CW\*(C`\-\-parse\*(C'\fR: +.Sp +.Vb 1 +\& graph\-easy input.txt \-\-parse \-\-stats +.Ve +.IP "\-\-timeout" 10 +.IX Item "--timeout" +Set the timeout \fBin seconds\fR for the Graph::Easy layouter that generates +\&\s-1ASCII\s0, \s-1HTML\s0, \s-1SVG\s0 or boxart output. If the layout does not +finish in this time, it will be aborted. Example: +.Sp +.Vb 1 +\& graph\-easy input.txt \-\-timeout=500 +.Ve +.Sp +Conversion to \s-1DOT\s0, \s-1VCG/GDL\s0, GraphML or plain text ignores the timeout. +.Sp +The default is 240 seconds (4 minutes). +.IP "\-\-verbose" 10 +.IX Item "--verbose" +Write info regarding the conversion process to \s-1STDERR\s0. +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`graph\-easy\*(C'\fR reads a description of a graph (a connected network of +nodes and edges, not a pie chart :\-) and then converts this to the desired +output format. +.PP +By default, the input will be read from \s-1STDIN\s0, and the output will go to +\&\s-1STDOUT\s0. The input is expected to be encoded in \s-1UTF\-8\s0, the output will +also be \s-1UTF\-8\s0. +.PP +It understands the following formats as input: +.PP +.Vb 4 +\& Graph::Easy http://bloodgate.com/perl/graph/manual/ +\& DOT http://www.graphviz.org/ +\& VCG http://rw4.cs.uni\-sb.de/~sander/html/gsvcg1.html +\& GDL http://www.aisee.com/ +.Ve +.PP +The formats are automatically detected, regardless of the input file name, +but you can also explicitly declare your input to be in one specific +format. +.PP +The output can be a dump of the graph in one of the following formats: +.PP +.Vb 5 +\& Graph::Easy http://bloodgate.com/perl/graph/manual/ +\& DOT http://www.graphviz.org/ +\& VCG http://rw4.cs.uni\-sb.de/~sander/html/gsvcg1.html +\& GDL http://www.aisee.com/ +\& GraphML http://graphml.graphdrawing.org/ +.Ve +.PP +In addition, \f(CW\*(C`Graph::Easy\*(C'\fR can also create layouts of graphs in +one of the following output formats: +.PP +.Vb 1 +\& HTML SVG ASCII BOXART +.Ve +.PP +Note that for \s-1SVG\s0 output, you need to install the module +Graph::Easy::As_svg first. +.PP +As a shortcut, you can also specify the output format as 'png', this will +cause \f(CW\*(C`graph\-easy\*(C'\fR to pipe the input in graphviz format to the \f(CW\*(C`dot\*(C'\fR program +to create a \s-1PNG\s0 file in one step. The following two examples are equivalent: +.PP +.Vb 2 +\& graph\-easy graph.txt \-\-dot | dot \-Tpng \-o graph.png +\& graph\-easy graph.txt \-\-png +.Ve +.PP + +.IX Xref "svg html ascii boxart png dot graphviz vcg gdl graph description language unicode" +.SH "OTHER ARGUMENTS" +.IX Header "OTHER ARGUMENTS" +\&\f(CW\*(C`graph\-easy\*(C'\fR supports a few more arguments in addition to the ones from above: +.IP "\-\-version" 10 +.IX Item "--version" +Write version info and exit. +.IP "\-\-debug=N" 10 +.IX Item "--debug=N" +Set the debug level (1..3). Warning, this will generate huge +amounts of hard to understand output on \s-1STDERR\s0. Example: +.Sp +.Vb 1 +\& graph\-easy input.txt \-\-output=test.html \-\-debug=1 +.Ve +.IP "\-\-png, \-\-dot, \-\-vcg, \-\-gdl, \-\-txt, \-\-ascii, \-\-boxart, \-\-html, \-\-svg" 10 +.IX Item "--png, --dot, --vcg, --gdl, --txt, --ascii, --boxart, --html, --svg" +Given exactly one of these options, produces the desired output format. +.SH "EXAMPLES" +.IX Header "EXAMPLES" +.SS "\s-1ASCII\s0 output" +.IX Subsection "ASCII output" +.Vb 1 +\& echo "[ Bonn ] \-\- car \-\-> [ Berlin ], [ Ulm ]" | graph\-easy +\& +\& +\-\-\-\-\-\-\-\-+ car +\-\-\-\-\-+ +\& | Bonn | \-\-\-\-\-> | Ulm | +\& +\-\-\-\-\-\-\-\-+ +\-\-\-\-\-+ +\& | +\& | car +\& v +\& +\-\-\-\-\-\-\-\-+ +\& | Berlin | +\& +\-\-\-\-\-\-\-\-+ +.Ve +.SS "Graphviz example output" +.IX Subsection "Graphviz example output" +.Vb 2 +\& echo "[ Bonn ] \-\- car \-\-> [ Berlin ], [ Ulm ]" | graph\-easy \-\-dot +\& digraph GRAPH_0 { +\& +\& edge [ arrowhead=open ]; +\& graph [ rankdir=LR ]; +\& node [ +\& fontsize=11, +\& fillcolor=white, +\& style=filled, +\& shape=box ]; +\& +\& Bonn \-> Ulm [ label=car ] +\& Bonn \-> Berlin [ label=car ] +\& +\& } +.Ve +.SS "\s-1VCG\s0 example output" +.IX Subsection "VCG example output" +.Vb 3 +\& echo "[ Bonn ] \-\- car \-\-> [ Berlin ], [ Ulm ]" | graph\-easy \-\-vcg +\& graph: { +\& title: "Untitled graph" +\& +\& node: { title: "Berlin" } +\& node: { title: "Bonn" } +\& node: { title: "Ulm" } +\& +\& edge: { label: "car" sourcename: "Bonn" targetname: "Ulm" } +\& edge: { label: "car" sourcename: "Bonn" targetname: "Berlin" } +\& +\& } +.Ve +.SS "\s-1GDL\s0 example output" +.IX Subsection "GDL example output" +\&\s-1GDL\s0 (Graph Description Language) is a superset of \s-1VCG\s0, and thus the output will +look almost the same as \s-1VCG:\s0 +.PP +.Vb 3 +\& echo "[ Bonn ] \-\- car \-\-> [ Berlin ], [ Ulm ]" | graph\-easy \-\-gdl +\& graph: { +\& title: "Untitled graph" +\& +\& node: { title: "Berlin" } +\& node: { title: "Bonn" } +\& node: { title: "Ulm" } +\& +\& edge: { label: "car" source: "Bonn" target: "Ulm" } +\& edge: { label: "car" source: "Bonn" target: "Berlin" } +\& +\& } +.Ve +.SS "GraphML example output" +.IX Subsection "GraphML example output" +GraphML is \s-1XML:\s0 +.PP +.Vb 6 +\& echo "[ Bonn ] \-\- car \-\-> [ Berlin ], [ Ulm ]" | graph\-easy \-\-graphml +\& <?xml version="1.0" encoding="UTF\-8"?> +\& <graphml xmlns="http://graphml.graphdrawing.org/xmlns" +\& xmlns:xsi="http://www.w3.org/2001/XMLSchema\-instance" +\& xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns +\& http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"> +\& +\& <!\-\- Created by Graph::Easy v0.58 at Mon Aug 20 00:01:25 2007 \-\-> +\& +\& <key id="d0" for="edge" attr.name="label" attr.type="string"/> +\& +\& <graph id="G" edgedefault="directed"> +\& <node id="Berlin"> +\& </node> +\& <node id="Bonn"> +\& </node> +\& <node id="Ulm"> +\& </node> +\& <edge source="Bonn" target="Berlin"> +\& <data key="d0">car</data> +\& </edge> +\& <edge source="Bonn" target="Ulm"> +\& <data key="d0">car</data> +\& </edge> +\& </graph> +\& <graphml> +.Ve +.SH "CAVEATS" +.IX Header "CAVEATS" +Please note that it is impossible to convert 100% from one format to another +format since every graph language out there has features that are unique to +only this language. +.PP +In addition, the conversion process always converts the input first into an +Graph::Easy graph, and then to the desired output format. +.PP +This means that only features and attributes that are actually valid in +Graph::Easy are supported yet. Work in making Graph::Easy an universal +format supporting as much as possible is still in progress. +.PP +Attributes that are not yet supported natively by Graph::Easy are converted +to custom attributes with a prefixed \f(CW\*(C`x\-format\-\*(C'\fR, f.i. \f(CW\*(C`x\-dot\-\*(C'\fR. Upon output +to the same format, these are converted back, but conversion to a different +format will lose these attributes. +.PP +For a list of what problems still remain, please see the \s-1TODO\s0 +file in the \f(CW\*(C`Graph::Easy\*(C'\fR distribution on \s-1CPAN:\s0 +.PP +http://search.cpan.org/~tels/Graph\-Easy/ <http://search.cpan.org/~tels/Graph-Easy/> +.PP +If you notice anything wrong, or miss attributes, please file a bug report on +.PP +http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Graph\-Easy <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Graph-Easy> +.PP +so we can fix it and include the missing things into Graph::Easy! +.PP + +.IX Xref "bugreport" +.SH "LICENSE" +.IX Header "LICENSE" +This library is free software; you can redistribute it and/or modify +it under the terms of the \s-1GPL\s0. +.PP +See the \s-1LICENSE\s0 file of Graph::Easy for a copy of the \s-1GPL\s0. +.PP +This product includes color specifications and designs developed by Cynthia +Brewer (<http://colorbrewer.org/>). See the \s-1LICENSE\s0 file for the full license +text that applies to these color schemes. +.IX Xref "gpl apache-style cynthia brewer colorscheme license" +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2008 by Tels <http://bloodgate.com> +.SH "SEE ALSO" +.IX Header "SEE ALSO" +More information can be found in the online manual of Graph::Easy: +.PP +<http://bloodgate.com/perl/graph/manual/> +.PP +See also: Graph::Easy, Graph::Easy::Manual diff --git a/lib/perl/man/man3/Graph::Easy.3pm b/lib/perl/man/man3/Graph::Easy.3pm new file mode 100644 index 0000000000000000000000000000000000000000..ec126cec753e81a1e9410321a4534f4cc9e1a9ed --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy.3pm @@ -0,0 +1,2085 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy 3" +.TH Graph::Easy 3 "2011-12-23" "perl v5.12.4" "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::Easy \- Convert or render graphs (as ASCII, HTML, SVG or via Graphviz) +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& # make a fresh copy of the graph +\& my $new_graph = $graph\->copy(); +\& +\& $graph\->add_edge (\*(AqBonn\*(Aq, \*(AqBerlin\*(Aq); +\& +\& # will not add it, since it already exists +\& $graph\->add_edge_once (\*(AqBonn\*(Aq, \*(AqBerlin\*(Aq); +\& +\& print $graph\->as_ascii( ); # prints: +\& +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& # | Bonn | \-\-> | Berlin | +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& +\& ##################################################### +\& # alternatively, let Graph::Easy parse some text: +\& +\& my $graph = Graph::Easy\->new( \*(Aq[Bonn] \-> [Berlin]\*(Aq ); +\& +\& ##################################################### +\& # slightly more verbose way: +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $bonn = $graph\->add_node(\*(AqBonn\*(Aq); +\& $bonn\->set_attribute(\*(Aqborder\*(Aq, \*(Aqsolid 1px black\*(Aq); +\& +\& my $berlin = $graph\->add_node(\*(AqBerlin\*(Aq); +\& +\& $graph\->add_edge ($bonn, $berlin); +\& +\& print $graph\->as_ascii( ); +\& +\& # You can use plain scalars as node names and for the edge label: +\& $graph\->add_edge (\*(AqBerlin\*(Aq, \*(AqFrankfurt\*(Aq, \*(Aqvia train\*(Aq); +\& +\& # adding edges with attributes: +\& +\& my $edge = Graph::Easy::Edge\->new(); +\& $edge\->set_attributes( { +\& label => \*(Aqtrain\*(Aq, +\& style => \*(Aqdotted\*(Aq, +\& color => \*(Aqred\*(Aq, +\& } ); +\& +\& # now with the optional edge object +\& $graph\->add_edge ($bonn, $berlin, $edge); +\& +\& # raw HTML section +\& print $graph\->as_html( ); +\& +\& # complete HTML page (with CSS) +\& print $graph\->as_html_file( ); +\& +\& # Other possibilities: +\& +\& # SVG (possible after you installed Graph::Easy::As_svg): +\& print $graph\->as_svg( ); +\& +\& # Graphviz: +\& my $graphviz = $graph\->as_graphviz(); +\& open $DOT, \*(Aq|dot \-Tpng \-o graph.png\*(Aq or die ("Cannot open pipe to dot: $!"); +\& print $DOT $graphviz; +\& close $DOT; +\& +\& # Please see also the command line utility \*(Aqgraph\-easy\*(Aq +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy\*(C'\fR lets you generate graphs consisting of various shaped +nodes connected by edges (with optional labels). +.PP +It can read and write graphs in a varity of formats, as well as render +them via its own grid-based layouter. +.PP +Since the layouter works on a grid (manhattan layout), the output is +most useful for flow charts, network diagrams, or hierarchy trees. +.PP + +.IX Xref "graph drawing diagram flowchart layout manhattan" +.SS "Input" +.IX Subsection "Input" +Apart from driving the module with Perl code, you can also use +\&\f(CW\*(C`Graph::Easy::Parser\*(C'\fR to parse graph descriptions like: +.PP +.Vb 3 +\& [ Bonn ] \-\-> [ Berlin ] +\& [ Frankfurt ] <=> [ Dresden ] +\& [ Bonn ] \-\- [ Frankfurt ] +.Ve +.PP +See the \f(CW\*(C`EXAMPLES\*(C'\fR section below for how this might be rendered. +.SS "Creating graphs" +.IX Subsection "Creating graphs" +First, create a graph object: +.PP +.Vb 1 +\& my $graph = Graph::Easy\->new(); +.Ve +.PP +Then add a node to it: +.PP +.Vb 1 +\& my $node = $graph\->add_node(\*(AqKoblenz\*(Aq); +.Ve +.PP +Don't worry, adding the node again will do nothing: +.PP +.Vb 1 +\& $node = $graph\->add_node(\*(AqKoblenz\*(Aq); +.Ve +.PP +You can get back a node by its name with \f(CW\*(C`node()\*(C'\fR: +.PP +.Vb 1 +\& $node = $graph\->node(\*(AqKoblenz\*(Aq); +.Ve +.PP +You can either add another node: +.PP +.Vb 1 +\& my $second = $graph\->node(\*(AqFrankfurt\*(Aq); +.Ve +.PP +Or add an edge straight-away: +.PP +.Vb 1 +\& my ($first,$second,$edge) = $graph\->add_edge(\*(AqMainz\*(Aq,\*(AqUlm\*(Aq); +.Ve +.PP +Adding the edge the second time creates another edge from 'Mainz' to 'Ulm': +.PP +.Vb 2 +\& my $other_edge; +\& ($first,$second,$other_edge) = $graph\->add_edge(\*(AqMainz\*(Aq,\*(AqUlm\*(Aq); +.Ve +.PP +This can be avoided by using \f(CW\*(C`add_edge_once()\*(C'\fR: +.PP +.Vb 6 +\& my $edge = $graph\->add_edge_once(\*(AqMainz\*(Aq,\*(AqUlm\*(Aq); +\& if (defined $edge) +\& { +\& # the first time the edge was added, do something with it +\& $edge\->set_attribute(\*(Aqcolor\*(Aq,\*(Aqblue\*(Aq); +\& } +.Ve +.PP +You can set attributes on nodes and edges: +.PP +.Vb 2 +\& $node\->attribute(\*(Aqfill\*(Aq, \*(Aqyellow\*(Aq); +\& $edge\->attribute(\*(Aqlabel\*(Aq, \*(Aqtrain\*(Aq); +.Ve +.PP +It is possible to add an edge with a label: +.PP +.Vb 1 +\& $graph\->add_edge(\*(AqCottbus\*(Aq, \*(AqBerlin\*(Aq, \*(Aqmy label\*(Aq); +.Ve +.PP +You can also add self-loops: +.PP +.Vb 1 +\& $graph\->add_edge(\*(AqBremen\*(Aq,\*(AqBremen\*(Aq); +.Ve +.PP +Adding multiple nodes is easy: +.PP +.Vb 1 +\& my ($bonn,$rom) = Graph::Easy\->add_nodes(\*(AqBonn\*(Aq,\*(AqRom\*(Aq); +.Ve +.PP +You can also have subgraphs (these are called groups): +.PP +.Vb 1 +\& my ($group) = Graph::Easy\->add_group(\*(AqCities\*(Aq); +.Ve +.PP +Only nodes can be part of a group, edges are automatically considered +to be in the group if they lead from one node inside the group to +another node in the same group. There are multiple ways to add one or +more nodes into a group: +.PP +.Vb 3 +\& $group\->add_member($bonn); +\& $group\->add_node($rom); +\& $group\->add_nodes($rom,$bonn); +.Ve +.PP +For more options please see the online manual: +<http://bloodgate.com/perl/graph/manual/> . +.SS "Output" +.IX Subsection "Output" +The output can be done in various styles: +.IP "\s-1ASCII\s0 \s-1ART\s0" 2 +.IX Item "ASCII ART" +Uses things like \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR \f(CW\*(C`<\*(C'\fR and \f(CW\*(C`|\*(C'\fR to render the boxes. +.IP "\s-1BOXART\s0" 2 +.IX Item "BOXART" +Uses Unicode box art drawing elements to output the graph. +.IP "\s-1HTML\s0" 2 +.IX Item "HTML" +\&\s-1HTML\s0 tables with \s-1CSS\s0 making everything \*(L"pretty\*(R". +.IP "\s-1SVG\s0" 2 +.IX Item "SVG" +Creates a Scalable Vector Graphics output. +.IP "Graphviz" 2 +.IX Item "Graphviz" +Creates graphviz code that can be feed to 'dot', 'neato' or similar programs. +.IP "GraphML" 2 +.IX Item "GraphML" +Creates a textual description of the graph in the GraphML format. +.IP "\s-1GDL/VCG\s0" 2 +.IX Item "GDL/VCG" +Creates a textual description of the graph in the \s-1VCG\s0 or \s-1GDL\s0 (Graph +Description Language) format. +.PP + +.IX Xref "ascii html svg boxart graphviz dot neato" +.SH "EXAMPLES" +.IX Header "EXAMPLES" +The following examples are given in the simple text format that is understood +by Graph::Easy::Parser. +.PP +You can also see many more examples at: +.PP +<http://bloodgate.com/perl/graph/> +.SS "One node" +.IX Subsection "One node" +The most simple graph (apart from the empty one :) is a graph consisting of +only one node: +.PP +.Vb 1 +\& [ Dresden ] +.Ve +.SS "Two nodes" +.IX Subsection "Two nodes" +A simple graph consisting of two nodes, linked together by a directed edge: +.PP +.Vb 1 +\& [ Bonn ] \-> [ Berlin ] +.Ve +.SS "Three nodes" +.IX Subsection "Three nodes" +A graph consisting of three nodes, and both are linked from the first: +.PP +.Vb 2 +\& [ Bonn ] \-> [ Berlin ] +\& [ Bonn ] \-> [ Hamburg ] +.Ve +.SS "Three nodes in a chain" +.IX Subsection "Three nodes in a chain" +A graph consisting of three nodes, showing that you can chain connections together: +.PP +.Vb 1 +\& [ Bonn ] \-> [ Berlin ] \-> [ Hamburg ] +.Ve +.SS "Two not connected graphs" +.IX Subsection "Two not connected graphs" +A graph consisting of two separate parts, both of them not connected +to each other: +.PP +.Vb 2 +\& [ Bonn ] \-> [ Berlin ] +\& [ Freiburg ] \-> [ Hamburg ] +.Ve +.SS "Three nodes, interlinked" +.IX Subsection "Three nodes, interlinked" +A graph consisting of three nodes, and two of the are connected from +the first node: +.PP +.Vb 3 +\& [ Bonn ] \-> [ Berlin ] +\& [ Berlin ] \-> [ Hamburg ] +\& [ Bonn ] \-> [ Hamburg ] +.Ve +.SS "Different edge styles" +.IX Subsection "Different edge styles" +A graph consisting of a couple of nodes, linked with the +different possible edge styles. +.PP +.Vb 8 +\& [ Bonn ] <\-> [ Berlin ] # bidirectional +\& [ Berlin ] ==> [ Rostock ] # double +\& [ Hamburg ] ..> [ Altona ] # dotted +\& [ Dresden ] \- > [ Bautzen ] # dashed +\& [ Leipzig ] ~~> [ Kirchhain ] # wave +\& [ Hof ] .\-> [ Chemnitz ] # dot\-dash +\& [ Magdeburg ] <=> [ Ulm ] # bidrectional, double etc +\& [ Magdeburg ] \-\- [ Ulm ] # arrow\-less edge +.Ve +.PP +More examples at: <http://bloodgate.com/perl/graph/> +.SH "ANIMATION SUPPORT" +.IX Header "ANIMATION SUPPORT" +\&\fBNote: Animations are not yet implemented!\fR +.PP +It is possible to add animations to a graph. This is done by +adding \fIsteps\fR via the pseudo-class \f(CW\*(C`step\*(C'\fR: +.PP +.Vb 10 +\& step.0 { +\& target: Bonn; # find object with id=Bonn, or +\& # if this fails, the node named +\& # "Bonn". +\& animate: fill: # animate this attribute +\& from: yellow; # start value (0% of duration) +\& via: red; # at 50% of the duration +\& to: yellow; # and 100% of duration +\& wait: 0; # after triggering, wait so many seconds +\& duration: 5; # entire time to go from "from" to "to" +\& trigger: onload; # when to trigger this animation +\& repeat: 2; # how often to repeat ("2" means two times) +\& # also "infinite", then "next" will be ignored +\& next: 1; # which step to take after repeat is up +\& } +\& step.1 { +\& from: white; # set to white +\& to: white; +\& duration: 0.1; # 100ms +\& next: 0; # go back to step.0 +\& } +.Ve +.PP +Here two steps are created, \fI0\fR and \fI1\fR and the animation will +be going like this: +.PP +.Vb 6 +\& 0.1s +\& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +\& v | +\& +\-\-\-\-\-\-\-\-+ 0s +\-\-\-\-\-\-\-\-+ 5s +\-\-\-\-\-\-\-\-+ 5s +\-\-\-\-\-\-\-\-+ +\& | onload | \-\-\-\-> | step.0 | \-\-\-\-> | step.0 | \-\-\-\-> | step.1 | +\& +\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +.Ve +.PP +You can generate a a graph with the animation flow via +\&\f(CW\*(C`animation_as_graph()\*(C'\fR. +.SS "Output" +.IX Subsection "Output" +Currently no output formats supports animations yet. +.SH "METHODS" +.IX Header "METHODS" +\&\f(CW\*(C`Graph::Easy\*(C'\fR supports the following methods: +.SS "\fInew()\fP" +.IX Subsection "new()" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new( ); +.Ve +.PP +Creates a new, empty \f(CW\*(C`Graph::Easy\*(C'\fR object. +.PP +Takes optinal a hash reference with a list of options. The following are +valid options: +.PP +.Vb 5 +\& debug if true, enables debug output +\& timeout timeout (in seconds) for the layouter +\& fatal_errors wrong attributes are fatal errors, default: true +\& strict test attribute names for being valid, default: true +\& undirected create an undirected graph, default: false +.Ve +.SS "\fIcopy()\fP" +.IX Subsection "copy()" +.Vb 1 +\& my $copy = $graph\->copy( ); +.Ve +.PP +Create a copy of this graph and return it as a new Graph::Easy object. +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& my $error = $graph\->error(); +.Ve +.PP +Returns the last error or '' for none. +Optionally, takes an error message to be set. +.PP +.Vb 1 +\& $graph\->error( \*(AqExpected Foo, but found Bar.\*(Aq ); +.Ve +.PP +See \fIwarn()\fR on how to catch error messages. See also \fInon_fatal_errors()\fR +on how to turn errors into warnings. +.SS "\fIwarn()\fP" +.IX Subsection "warn()" +.Vb 1 +\& my $warning = $graph\->warn(); +.Ve +.PP +Returns the last warning or '' for none. +Optionally, takes a warning message to be output to \s-1STDERR:\s0 +.PP +.Vb 1 +\& $graph\->warn( \*(AqExpected Foo, but found Bar.\*(Aq ); +.Ve +.PP +If you want to catch warnings from the layouter, enable catching +of warnings or errors: +.PP +.Vb 1 +\& $graph\->catch_messages(1); +\& +\& # Or individually: +\& # $graph\->catch_warnings(1); +\& # $graph\->catch_errors(1); +\& +\& # something which warns or throws an error: +\& ... +\& +\& if ($graph\->error()) +\& { +\& my @errors = $graph\->errors(); +\& } +\& if ($graph\->warning()) +\& { +\& my @warnings = $graph\->warnings(); +\& } +.Ve +.PP +See Graph::Easy::Base for more details on error/warning message capture. +.SS "\fIadd_edge()\fP" +.IX Subsection "add_edge()" +.Vb 1 +\& my ($first, $second, $edge) = $graph\->add_edge( \*(Aqnode 1\*(Aq, \*(Aqnode 2\*(Aq); +.Ve +.SS "\fIadd_edge()\fP" +.IX Subsection "add_edge()" +.Vb 3 +\& my ($first, $second, $edge) = $graph\->add_edge( \*(Aqnode 1\*(Aq, \*(Aqnode 2\*(Aq); +\& my $edge = $graph\->add_edge( $x, $y, $edge); +\& $graph\->add_edge( $x, $y); +.Ve +.PP +Add an edge between nodes X and Y. The optional edge object defines +the style of the edge, if not present, a default object will be used. +.PP +When called in scalar context, will return \f(CW$edge\fR. In array/list context +it will return the two nodes and the edge object. +.PP +\&\f(CW$x\fR and \f(CW$y\fR should be either plain scalars with the names of +the nodes, or objects of Graph::Easy::Node, +while the optional \f(CW$edge\fR should be Graph::Easy::Edge. +.PP +Note: \f(CW\*(C`Graph::Easy\*(C'\fR graphs are multi-edged, and adding the same edge +twice will result in two edges going from \f(CW$x\fR to \f(CW$y\fR! See +\&\f(CW\*(C`add_edge_once()\*(C'\fR on how to avoid that. +.PP +You can also use \f(CW\*(C`edge()\*(C'\fR to check whether an edge from X to Y already exists +in the graph. +.SS "\fIadd_edge_once()\fP" +.IX Subsection "add_edge_once()" +.Vb 3 +\& my ($first, $second, $edge) = $graph\->add_edge_once( \*(Aqnode 1\*(Aq, \*(Aqnode 2\*(Aq); +\& my $edge = $graph\->add_edge_once( $x, $y, $edge); +\& $graph\->add_edge_once( $x, $y); +\& +\& if (defined $edge) +\& { +\& # got added once, so do something with it +\& $edge\->set_attribute(\*(Aqlabel\*(Aq,\*(Aqunique\*(Aq); +\& } +.Ve +.PP +Adds an edge between nodes X and Y, unless there exists already +an edge between these two nodes. See \f(CW\*(C`add_edge()\*(C'\fR. +.PP +Returns undef when an edge between X and Y already exists. +.PP +When called in scalar context, will return \f(CW$edge\fR. In array/list context +it will return the two nodes and the edge object. +.SS "\fIflip_edges()\fP" +.IX Subsection "flip_edges()" +.Vb 3 +\& my $graph = Graph::Easy\->new(); +\& $graph\->add_edge(\*(AqBonn\*(Aq,\*(AqBerlin\*(Aq); +\& $graph\->add_edge(\*(AqBerlin\*(Aq,\*(AqBonn\*(Aq); +\& +\& print $graph\->as_ascii(); +\& +\& # +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +\& # v | +\& # +\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-+ +\& # | Berlin | \-\-> | Bonn | +\& # +\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-+ +\& +\& $graph\->flip_edges(\*(AqBonn\*(Aq, \*(AqBerlin\*(Aq); +\& +\& print $graph\->as_ascii(); +\& +\& # +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +\& # | v +\& # +\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-+ +\& # | Berlin | \-\-> | Bonn | +\& # +\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-+ +.Ve +.PP +Turn around (transpose) all edges that are going from the first node to the +second node. +.PP + +.IX Xref "transpose" +.SS "\fIadd_node()\fP" +.IX Subsection "add_node()" +.Vb 3 +\& my $node = $graph\->add_node( \*(AqNode 1\*(Aq ); +\& # or if you already have a Graph::Easy::Node object: +\& $graph\->add_node( $x ); +.Ve +.PP +Add a single node X to the graph. \f(CW$x\fR should be either a +\&\f(CW\*(C`Graph::Easy::Node\*(C'\fR object, or a unique name for the node. Will do +nothing if the node already exists in the graph. +.PP +It returns an Graph::Easy::Node object. +.SS "\fIadd_anon_node()\fP" +.IX Subsection "add_anon_node()" +.Vb 1 +\& my $anon_node = $graph\->add_anon_node( ); +.Ve +.PP +Creates a single, anonymous node and adds it to the graph, returning the +\&\f(CW\*(C`Graph::Easy::Node::Anon\*(C'\fR object. +.PP +The created node is equal to one created via \f(CW\*(C` [ ] \*(C'\fR in the Graph::Easy +text description. +.SS "\fIadd_nodes()\fP" +.IX Subsection "add_nodes()" +.Vb 1 +\& my @nodes = $graph\->add_nodes( \*(AqNode 1\*(Aq, \*(AqNode 2\*(Aq ); +.Ve +.PP +Add all the given nodes to the graph. The arguments should be either a +\&\f(CW\*(C`Graph::Easy::Node\*(C'\fR object, or a unique name for the node. Will do +nothing if the node already exists in the graph. +.PP +It returns a list of Graph::Easy::Node objects. +.SS "\fIrename_node()\fP" +.IX Subsection "rename_node()" +.Vb 1 +\& $node = $graph\->rename_node($node, $new_name); +.Ve +.PP +Changes the name of a node. If the passed node is not part of +this graph or just a string, it will be added with the new +name to this graph. +.PP +If the node was part of another graph, it will be deleted there and added +to this graph with the new name, effectively moving the node from the old +to the new graph and renaming it at the same time. +.SS "\fIdel_node()\fP" +.IX Subsection "del_node()" +.Vb 2 +\& $graph\->del_node(\*(AqNode name\*(Aq); +\& $graph\->del_node($node); +.Ve +.PP +Delete the node with the given name from the graph. +.SS "\fIdel_edge()\fP" +.IX Subsection "del_edge()" +.Vb 1 +\& $graph\->del_edge($edge); +.Ve +.PP +Delete the given edge object from the graph. You can use \f(CW\*(C`edge()\*(C'\fR to find +an edge from Node A to B: +.PP +.Vb 1 +\& $graph\->del_edge( $graph\->edge(\*(AqA\*(Aq,\*(AqB\*(Aq) ); +.Ve +.SS "\fImerge_nodes()\fP" +.IX Subsection "merge_nodes()" +.Vb 2 +\& $graph\->merge_nodes( $first_node, $second_node ); +\& $graph\->merge_nodes( $first_node, $second_node, $joiner ); +.Ve +.PP +Merge two nodes. Will delete all connections between the two nodes, then +move over any connection to/from the second node to the first, then delete +the second node from the graph. +.PP +Any attributes on the second node will be lost. +.PP +If present, the optional \f(CW$joiner\fR argument will be used to join +the label of the second node to the label of the first node. If not +present, the label of the second node will be dropped along with all +the other attributes: +.PP +.Vb 1 +\& my $graph = Graph::Easy\->new(\*(Aq[A]\->[B]\->[C]\->[D]\*(Aq); +\& +\& # this produces "[A]\->[C]\->[D]" +\& $graph\->merge_nodes( \*(AqA\*(Aq, \*(AqB\*(Aq ); +\& +\& # this produces "[A C]\->[D]" +\& $graph\->merge_nodes( \*(AqA\*(Aq, \*(AqC\*(Aq, \*(Aq \*(Aq ); +\& +\& # this produces "[A C \en D]", note single quotes on the third argument! +\& $graph\->merge_nodes( \*(AqA\*(Aq, \*(AqC\*(Aq, \*(Aq \en \*(Aq ); +.Ve +.SS "\fIget_attribute()\fP" +.IX Subsection "get_attribute()" +.Vb 1 +\& my $value = $graph\->get_attribute( $class, $name ); +.Ve +.PP +Return the value of attribute \f(CW$name\fR from class \f(CW$class\fR. +.PP +Example: +.PP +.Vb 1 +\& my $color = $graph\->attribute( \*(Aqnode\*(Aq, \*(Aqcolor\*(Aq ); +.Ve +.PP +You can also call all the various attribute related methods on members of the +graph directly, for instance: +.PP +.Vb 3 +\& $node\->get_attribute(\*(Aqlabel\*(Aq); +\& $edge\->get_attribute(\*(Aqcolor\*(Aq); +\& $group\->get_attribute(\*(Aqfill\*(Aq); +.Ve +.SS "\fIattribute()\fP" +.IX Subsection "attribute()" +.Vb 1 +\& my $value = $graph\->attribute( $class, $name ); +.Ve +.PP +Is an alias for get_attribute. +.SS "\fIcolor_attribute()\fP" +.IX Subsection "color_attribute()" +.Vb 2 +\& # returns f.i. #ff0000 +\& my $color = $graph\->get_color_attribute( \*(Aqnode\*(Aq, \*(Aqcolor\*(Aq ); +.Ve +.PP +Just like \fIget_attribute()\fR, but only for colors, and returns them as hex, +using the current colorscheme. +.SS "\fIget_color_attribute()\fP" +.IX Subsection "get_color_attribute()" +Is an alias for \fIcolor_attribute()\fR. +.SS "\fIget_attributes()\fP" +.IX Subsection "get_attributes()" +.Vb 1 +\& my $att = $object\->get_attributes(); +.Ve +.PP +Return all effective attributes on this object (graph/node/group/edge) as +an anonymous hash ref. This respects inheritance and default values. +.PP +Note that this does not include custom attributes. +.PP +See also get_custom_attributes and \fIraw_attributes()\fR. +.SS "\fIget_custom_attributes()\fP" +.IX Subsection "get_custom_attributes()" +.Vb 1 +\& my $att = $object\->get_custom_attributes(); +.Ve +.PP +Return all the custom attributes on this object (graph/node/group/edge) as +an anonymous hash ref. +.SS "\fIcustom_attributes()\fP" +.IX Subsection "custom_attributes()" +.Vb 1 +\& my $att = $object\->custom_attributes(); +.Ve +.PP +\&\f(CW\*(C`custom_attributes()\*(C'\fR is an alias for get_custom_attributes. +.SS "\fIraw_attributes()\fP" +.IX Subsection "raw_attributes()" +.Vb 1 +\& my $att = $object\->raw_attributes(); +.Ve +.PP +Return all set attributes on this object (graph, node, group or edge) as +an anonymous hash ref. Thus you get all the locally active attributes +for this object. +.PP +Inheritance is respected, e.g. attributes that have the value \*(L"inherit\*(R" +and are inheritable, will be inherited from the base class. +.PP +But default values for unset attributes are skipped. Here is an example: +.PP +.Vb 1 +\& node { color: red; } +\& +\& [ A ] { class: foo; color: inherit; } +.Ve +.PP +This will return: +.PP +.Vb 1 +\& { class => foo, color => red } +.Ve +.PP +As you can see, attributes like \f(CW\*(C`background\*(C'\fR etc. are not included, while +the color value was inherited properly. +.PP +See also \fIget_attributes()\fR. +.SS "\fIdefault_attribute()\fP" +.IX Subsection "default_attribute()" +.Vb 1 +\& my $def = $graph\->default_attribute($class, \*(Aqfill\*(Aq); +.Ve +.PP +Returns the default value for the given attribute \fBin the class\fR +of the object. +.PP +The default attribute is the value that will be used if +the attribute on the object itself, as well as the attribute +on the class is unset. +.PP +To find out what attribute is on the class, use the three-arg form +of attribute on the graph: +.PP +.Vb 2 +\& my $g = Graph::Easy\->new(); +\& my $node = $g\->add_node(\*(AqBerlin\*(Aq); +\& +\& print $node\->attribute(\*(Aqfill\*(Aq), "\en"; # print "white" +\& print $node\->default_attribute(\*(Aqfill\*(Aq), "\en"; # print "white" +\& print $g\->attribute(\*(Aqnode\*(Aq,\*(Aqfill\*(Aq), "\en"; # print "white" +\& +\& $g\->set_attribute(\*(Aqnode\*(Aq,\*(Aqfill\*(Aq,\*(Aqred\*(Aq); # class is "red" +\& $node\->set_attribute(\*(Aqfill\*(Aq,\*(Aqgreen\*(Aq); # this object is "green" +\& +\& print $node\->attribute(\*(Aqfill\*(Aq), "\en"; # print "green" +\& print $node\->default_attribute(\*(Aqfill\*(Aq), "\en"; # print "white" +\& print $g\->attribute(\*(Aqnode\*(Aq,\*(Aqfill\*(Aq), "\en"; # print "red" +.Ve +.PP +See also \fIraw_attribute()\fR. +.SS "\fIraw_attribute()\fP" +.IX Subsection "raw_attribute()" +.Vb 1 +\& my $value = $object\->raw_attribute( $name ); +.Ve +.PP +Return the value of attribute \f(CW$name\fR from the object it this +method is called on (graph, node, edge, group etc.). If the +attribute is not set on the object itself, returns undef. +.PP +This method respects inheritance, so an attribute value of 'inherit' +on an object will make the method return the inherited value: +.PP +.Vb 2 +\& my $g = Graph::Easy\->new(); +\& my $n = $g\->add_node(\*(AqA\*(Aq); +\& +\& $g\->set_attribute(\*(Aqcolor\*(Aq,\*(Aqred\*(Aq); +\& +\& print $n\->raw_attribute(\*(Aqcolor\*(Aq); # undef +\& $n\->set_attribute(\*(Aqcolor\*(Aq,\*(Aqinherit\*(Aq); +\& print $n\->raw_attribute(\*(Aqcolor\*(Aq); # \*(Aqred\*(Aq +.Ve +.PP +See also \fIattribute()\fR. +.SS "\fIraw_color_attribute()\fP" +.IX Subsection "raw_color_attribute()" +.Vb 2 +\& # returns f.i. #ff0000 +\& my $color = $graph\->raw_color_attribute(\*(Aqcolor\*(Aq ); +.Ve +.PP +Just like \fIraw_attribute()\fR, but only for colors, and returns them as hex, +using the current colorscheme. +.PP +If the attribute is not set on the object, returns \f(CW\*(C`undef\*(C'\fR. +.SS "\fIraw_attributes()\fP" +.IX Subsection "raw_attributes()" +.Vb 1 +\& my $att = $object\->raw_attributes(); +.Ve +.PP +Returns a hash with all the raw attributes of that object. +Attributes that are no set on the object itself, but on +the class this object belongs to are \fBnot\fR included. +.PP +This method respects inheritance, so an attribute value of 'inherit' +on an object will make the method return the inherited value. +.SS "\fIset_attribute()\fP" +.IX Subsection "set_attribute()" +.Vb 2 +\& # Set the attribute on the given class. +\& $graph\->set_attribute( $class, $name, $val ); +\& +\& # Set the attribute on the graph itself. This is synonymous +\& # to using \*(Aqgraph\*(Aq as class in the form above. +\& $graph\->set_attribute( $name, $val ); +.Ve +.PP +Sets a given attribute named \f(CW$name\fR to the new value \f(CW$val\fR in the class +specified in \f(CW$class\fR. +.PP +Example: +.PP +.Vb 1 +\& $graph\->set_attribute( \*(Aqgraph\*(Aq, \*(Aqgid\*(Aq, \*(Aq123\*(Aq ); +.Ve +.PP +The class can be one of \f(CW\*(C`graph\*(C'\fR, \f(CW\*(C`edge\*(C'\fR, \f(CW\*(C`node\*(C'\fR or \f(CW\*(C`group\*(C'\fR. The last +three can also have subclasses like in \f(CW\*(C`node.subclassname\*(C'\fR. +.PP +You can also call the various attribute related methods on members of the +graph directly, for instance: +.PP +.Vb 3 +\& $node\->set_attribute(\*(Aqlabel\*(Aq, \*(Aqmy node\*(Aq); +\& $edge\->set_attribute(\*(Aqcolor\*(Aq, \*(Aqred\*(Aq); +\& $group\->set_attribute(\*(Aqfill\*(Aq, \*(Aqgreen\*(Aq); +.Ve +.SS "\fIset_attributes()\fP" +.IX Subsection "set_attributes()" +.Vb 1 +\& $graph\->set_attributes( $class, $att ); +.Ve +.PP +Given a class name in \f(CW$class\fR and a hash of mappings between attribute names +and values in \f(CW$att\fR, will set all these attributes. +.PP +The class can be one of \f(CW\*(C`graph\*(C'\fR, \f(CW\*(C`edge\*(C'\fR, \f(CW\*(C`node\*(C'\fR or \f(CW\*(C`group\*(C'\fR. The last +three can also have subclasses like in \f(CW\*(C`node.subclassname\*(C'\fR. +.PP +Example: +.PP +.Vb 1 +\& $graph\->set_attributes( \*(Aqnode\*(Aq, { color => \*(Aqred\*(Aq, background => \*(Aqnone\*(Aq } ); +.Ve +.SS "\fIdel_attribute()\fP" +.IX Subsection "del_attribute()" +.Vb 1 +\& $graph\->del_attribute(\*(Aqborder\*(Aq); +.Ve +.PP +Delete the attribute with the given name from the object. +.PP +You can also call the various attribute related methods on members of the +graph directly, for instance: +.PP +.Vb 3 +\& $node\->del_attribute(\*(Aqlabel\*(Aq); +\& $edge\->del_attribute(\*(Aqcolor\*(Aq); +\& $group\->del_attribute(\*(Aqfill\*(Aq); +.Ve +.SS "\fIunquote_attribute()\fP" +.IX Subsection "unquote_attribute()" +.Vb 4 +\& # returns \*(Aq"Hello World!"\*(Aq +\& my $value = $self\->unquote_attribute(\*(Aqnode\*(Aq,\*(Aqlabel\*(Aq,\*(Aq"Hello World!"\*(Aq); +\& # returns \*(Aqred\*(Aq +\& my $color = $self\->unquote_attribute(\*(Aqnode\*(Aq,\*(Aqcolor\*(Aq,\*(Aq"red"\*(Aq); +.Ve +.PP +Return the attribute unquoted except for labels and titles, that is it removes +double quotes at the start and the end of the string, unless these are +escaped with a backslash. +.SS "\fIborder_attribute()\fP" +.IX Subsection "border_attribute()" +.Vb 1 +\& my $border = $graph\->border_attribute(); +.Ve +.PP +Return the combined border attribute like \*(L"1px solid red\*(R" from the +border(style|color|width) attributes. +.SS "\fIsplit_border_attributes()\fP" +.IX Subsection "split_border_attributes()" +.Vb 1 +\& my ($style,$width,$color) = $graph\->split_border_attribute($border); +.Ve +.PP +Split the border attribute (like \*(L"1px solid red\*(R") into the three different parts. +.SS "\fIquoted_comment()\fP" +.IX Subsection "quoted_comment()" +.Vb 1 +\& my $cmt = $node\->comment(); +.Ve +.PP +Comment of this object, quoted suitable as to be embedded into \s-1HTML/SVG\s0. +Returns the empty string if this object doesn't have a comment set. +.SS "\fIflow()\fP" +.IX Subsection "flow()" +.Vb 1 +\& my $flow = $graph\->flow(); +.Ve +.PP +Returns the flow of the graph, as absolute number in degress. +.SS "\fIsource_nodes()\fP" +.IX Subsection "source_nodes()" +.Vb 1 +\& my @roots = $graph\->source_nodes(); +.Ve +.PP +Returns all nodes that have only outgoing edges, e.g. are the root of a tree, +in no particular order. +.PP +Isolated nodes (no edges at all) will \fBnot\fR be included, see +\&\fIpredecessorless_nodes()\fR to get these, too. +.PP +In scalar context, returns the number of source nodes. +.SS "\fIpredecessorless_nodes()\fP" +.IX Subsection "predecessorless_nodes()" +.Vb 1 +\& my @roots = $graph\->predecessorless_nodes(); +.Ve +.PP +Returns all nodes that have no incoming edges, regardless of whether +they have outgoing edges or not, in no particular order. +.PP +Isolated nodes (no edges at all) \fBwill\fR be included in the list. +.PP +See also \fIsource_nodes()\fR. +.PP +In scalar context, returns the number of predecessorless nodes. +.SS "\fIroot_node()\fP" +.IX Subsection "root_node()" +.Vb 1 +\& my $root = $graph\->root_node(); +.Ve +.PP +Return the root node as Graph::Easy::Node object, if it was +set with the 'root' attribute. +.SS "\fItimeout()\fP" +.IX Subsection "timeout()" +.Vb 2 +\& print $graph\->timeout(), " seconds timeout for layouts.\en"; +\& $graph\->timeout(12); +.Ve +.PP +Get/set the timeout for layouts in seconds. If the layout process did not +finish after that time, it will be stopped and a warning will be printed. +.PP +The default timeout is 5 seconds. +.SS "\fIstrict()\fP" +.IX Subsection "strict()" +.Vb 2 +\& print "Graph has strict checking\en" if $graph\->strict(); +\& $graph\->strict(undef); # disable strict attribute checks +.Ve +.PP +Get/set the strict option. When set to a true value, all attribute names and +values will be strictly checked and unknown/invalid one will be rejected. +.PP +This option is on by default. +.SS "\fItype()\fP" +.IX Subsection "type()" +.Vb 1 +\& print "Graph is " . $graph\->type() . "\en"; +.Ve +.PP +Returns the type of the graph as string, either \*(L"directed\*(R" or \*(L"undirected\*(R". +.SS "\fIlayout()\fP" +.IX Subsection "layout()" +.Vb 2 +\& $graph\->layout(); +\& $graph\->layout( type => \*(Aqforce\*(Aq, timeout => 60 ); +.Ve +.PP +Creates the internal structures to layout the graph. +.PP +This method will be called automatically when you call any of the +\&\f(CW\*(C`as_FOO\*(C'\fR methods or \f(CW\*(C`output()\*(C'\fR as described below. +.PP +The options are: +.PP +.Vb 4 +\& type the type of the layout, possible values: +\& \*(Aqforce\*(Aq \- force based layouter +\& \*(Aqadhoc\*(Aq \- the default layouter +\& timeout timeout in seconds +.Ve +.PP +See also: \fItimeout()\fR. +.SS "\fIoutput_format()\fP" +.IX Subsection "output_format()" +.Vb 1 +\& $graph\->output_format(\*(Aqhtml\*(Aq); +.Ve +.PP +Set the outputformat. One of 'html', 'ascii', 'graphviz', 'svg' or 'txt'. +See also \fIoutput()\fR. +.SS "\fIoutput()\fP" +.IX Subsection "output()" +.Vb 1 +\& my $out = $graph\->output(); +.Ve +.PP +Output the graph in the format set by \f(CW\*(C`output_format()\*(C'\fR. +.SS "\fIas_ascii()\fP" +.IX Subsection "as_ascii()" +.Vb 1 +\& print $graph\->as_ascii(); +.Ve +.PP +Return the graph layout in \s-1ASCII\s0 art, in utf\-8. +.SS "\fIas_ascii_file()\fP" +.IX Subsection "as_ascii_file()" +.Vb 1 +\& print $graph\->as_ascii_file(); +.Ve +.PP +Is an alias for as_ascii. +.SS "\fIas_ascii_html()\fP" +.IX Subsection "as_ascii_html()" +.Vb 1 +\& print $graph\->as_ascii_html(); +.Ve +.PP +Return the graph layout in \s-1ASCII\s0 art, suitable to be embedded into an \s-1HTML\s0 +page. Basically it wraps the output from \fIas_ascii()\fR into +\&\f(CW\*(C`<pre> </pre>\*(C'\fR and inserts real \s-1HTML\s0 links. The returned +string is in utf\-8. +.SS "\fIas_boxart()\fP" +.IX Subsection "as_boxart()" +.Vb 1 +\& print $graph\->as_box(); +.Ve +.PP +Return the graph layout as box drawing using Unicode characters (in utf\-8, +as always). +.SS "\fIas_boxart_file()\fP" +.IX Subsection "as_boxart_file()" +.Vb 1 +\& print $graph\->as_boxart_file(); +.Ve +.PP +Is an alias for \f(CW\*(C`as_box\*(C'\fR. +.SS "\fIas_boxart_html()\fP" +.IX Subsection "as_boxart_html()" +.Vb 1 +\& print $graph\->as_boxart_html(); +.Ve +.PP +Return the graph layout as box drawing using Unicode characters, +as chunk that can be embedded into an \s-1HTML\s0 page. +.PP +Basically it wraps the output from \fIas_boxart()\fR into +\&\f(CW\*(C`<pre> </pre>\*(C'\fR and inserts real \s-1HTML\s0 links. The returned +string is in utf\-8. +.SS "\fIas_boxart_html_file()\fP" +.IX Subsection "as_boxart_html_file()" +.Vb 1 +\& print $graph\->as_boxart_html_file(); +.Ve +.PP +Return the graph layout as box drawing using Unicode characters, +as a full \s-1HTML\s0 page complete with header and footer. +.SS "\fIas_html()\fP" +.IX Subsection "as_html()" +.Vb 1 +\& print $graph\->as_html(); +.Ve +.PP +Return the graph layout as \s-1HTML\s0 section. See \fIcss()\fR to get the +\&\s-1CSS\s0 section to go with that \s-1HTML\s0 code. If you want a complete \s-1HTML\s0 page +then use \fIas_html_file()\fR. +.SS "\fIas_html_page()\fP" +.IX Subsection "as_html_page()" +.Vb 1 +\& print $graph\->as_html_page(); +.Ve +.PP +Is an alias for \f(CW\*(C`as_html_file\*(C'\fR. +.SS "\fIas_html_file()\fP" +.IX Subsection "as_html_file()" +.Vb 1 +\& print $graph\->as_html_file(); +.Ve +.PP +Return the graph layout as \s-1HTML\s0 complete with headers, \s-1CSS\s0 section and +footer. Can be viewed in the browser of your choice. +.SS "\fIadd_group()\fP" +.IX Subsection "add_group()" +.Vb 1 +\& my $group = $graph\->add_group(\*(AqGroup name\*(Aq); +.Ve +.PP +Add a group to the graph and return it as Graph::Easy::Group object. +.SS "\fIgroup()\fP" +.IX Subsection "group()" +.Vb 1 +\& my $group = $graph\->group(\*(AqName\*(Aq); +.Ve +.PP +Returns the group with the name \f(CW\*(C`Name\*(C'\fR as Graph::Easy::Group object. +.SS "\fIrename_group()\fP" +.IX Subsection "rename_group()" +.Vb 1 +\& $group = $graph\->rename_group($group, $new_name); +.Ve +.PP +Changes the name of the given group. If the passed group is not part of +this graph or just a string, it will be added with the new +name to this graph. +.PP +If the group was part of another graph, it will be deleted there and added +to this graph with the new name, effectively moving the group from the old +to the new graph and renaming it at the same time. +.SS "\fIgroups()\fP" +.IX Subsection "groups()" +.Vb 1 +\& my @groups = $graph\->groups(); +.Ve +.PP +Returns the groups of the graph as Graph::Easy::Group objects, +in arbitrary order. +.SS "\fIgroups_within()\fP" +.IX Subsection "groups_within()" +.Vb 3 +\& # equivalent to $graph\->groups(): +\& my @groups = $graph\->groups_within(); # all +\& my @toplevel_groups = $graph\->groups_within(0); # level 0 only +.Ve +.PP +Return the groups that are inside this graph, up to the specified level, +in arbitrary order. +.PP +The default level is \-1, indicating no bounds and thus all contained +groups are returned. +.PP +A level of 0 means only the direct children, and hence only the toplevel +groups will be returned. A level 1 means the toplevel groups and their +toplevel children, and so on. +.SS "\fIanon_groups()\fP" +.IX Subsection "anon_groups()" +.Vb 1 +\& my $anon_groups = $graph\->anon_groups(); +.Ve +.PP +In scalar context, returns the number of anon groups (aka +Graph::Easy::Group::Anon) the graph has. +.PP +In list context, returns all anon groups as objects, in arbitrary order. +.SS "\fIdel_group()\fP" +.IX Subsection "del_group()" +.Vb 1 +\& $graph\->del_group($name); +.Ve +.PP +Delete the group with the given name. +.SS "\fIedges()\fP, \fIedges_within()\fP" +.IX Subsection "edges(), edges_within()" +.Vb 1 +\& my @edges = $graph\->edges(); +.Ve +.PP +Returns the edges of the graph as Graph::Easy::Edge objects, +in arbitrary order. +.PP +\&\fIedges_within()\fR is an alias for \f(CW\*(C`edges()\*(C'\fR. +.SS "\fIis_simple_graph()\fP, \fIis_simple()\fP" +.IX Subsection "is_simple_graph(), is_simple()" +.Vb 3 +\& if ($graph\->is_simple()) +\& { +\& } +.Ve +.PP +Returns true if the graph does not have multiedges, e.g. if it +does not have more than one edge going from any node to any other +node or group. +.PP +Since this method has to look at all edges, it is costly in terms of +both \s-1CPU\s0 and memory. +.SS "\fIis_directed()\fP" +.IX Subsection "is_directed()" +.Vb 3 +\& if ($graph\->is_directed()) +\& { +\& } +.Ve +.PP +Returns true if the graph is directed. +.SS "\fIis_undirected()\fP" +.IX Subsection "is_undirected()" +.Vb 3 +\& if ($graph\->is_undirected()) +\& { +\& } +.Ve +.PP +Returns true if the graph is undirected. +.SS "\fIparent()\fP" +.IX Subsection "parent()" +.Vb 1 +\& my $parent = $graph\->parent(); +.Ve +.PP +Returns the parent graph, for graphs this is undef. +.SS "\fIlabel()\fP" +.IX Subsection "label()" +.Vb 1 +\& my $label = $graph\->label(); +.Ve +.PP +Returns the label of the graph. +.SS "\fItitle()\fP" +.IX Subsection "title()" +.Vb 1 +\& my $title = $graph\->title(); +.Ve +.PP +Returns the (mouseover) title of the graph. +.SS "\fIlink()\fP" +.IX Subsection "link()" +.Vb 1 +\& my $link = $graph\->link(); +.Ve +.PP +Return a potential link (for the graphs label), build from the attributes \f(CW\*(C`linkbase\*(C'\fR +and \f(CW\*(C`link\*(C'\fR (or autolink). Returns '' if there is no link. +.SS "\fIas_graphviz()\fP" +.IX Subsection "as_graphviz()" +.Vb 1 +\& print $graph\->as_graphviz(); +.Ve +.PP +Return the graph as graphviz code, suitable to be feed to a program like +\&\f(CW\*(C`dot\*(C'\fR etc. +.SS "\fIas_graphviz_file()\fP" +.IX Subsection "as_graphviz_file()" +.Vb 1 +\& print $graph\->as_graphviz_file(); +.Ve +.PP +Is an alias for \fIas_graphviz()\fR. +.SS "\fIangle()\fP" +.IX Subsection "angle()" +.Vb 2 +\& my $degrees = Graph::Easy\->angle( \*(Aqsouth\*(Aq ); +\& my $degrees = Graph::Easy\->angle( 120 ); +.Ve +.PP +Check an angle for being valid and return a value between \-359 and 359 +degrees. The special values \f(CW\*(C`south\*(C'\fR, \f(CW\*(C`north\*(C'\fR, \f(CW\*(C`west\*(C'\fR, \f(CW\*(C`east\*(C'\fR, \f(CW\*(C`up\*(C'\fR +and \f(CW\*(C`down\*(C'\fR are also valid and converted to degrees. +.SS "\fInodes()\fP" +.IX Subsection "nodes()" +.Vb 1 +\& my $nodes = $graph\->nodes(); +.Ve +.PP +In scalar context, returns the number of nodes/vertices the graph has. +.PP +In list context, returns all nodes as objects, in arbitrary order. +.SS "\fIanon_nodes()\fP" +.IX Subsection "anon_nodes()" +.Vb 1 +\& my $anon_nodes = $graph\->anon_nodes(); +.Ve +.PP +In scalar context, returns the number of anon nodes (aka +Graph::Easy::Node::Anon) the graph has. +.PP +In list context, returns all anon nodes as objects, in arbitrary order. +.SS "\fIhtml_page_header()\fP" +.IX Subsection "html_page_header()" +.Vb 2 +\& my $header = $graph\->html_page_header(); +\& my $header = $graph\->html_page_header($css); +.Ve +.PP +Return the header of an \s-1HTML\s0 page. Used together with html_page_footer +by as_html_page to construct a complete \s-1HTML\s0 page. +.PP +Takes an optional parameter with the \s-1CSS\s0 styles to be inserted into the +header. If \f(CW$css\fR is not defined, embedds the result of \f(CW\*(C`$self\->css()\*(C'\fR. +.SS "\fIhtml_page_footer()\fP" +.IX Subsection "html_page_footer()" +.Vb 1 +\& my $footer = $graph\->html_page_footer(); +.Ve +.PP +Return the footer of an \s-1HTML\s0 page. Used together with html_page_header +by as_html_page to construct a complete \s-1HTML\s0 page. +.SS "\fIcss()\fP" +.IX Subsection "css()" +.Vb 1 +\& my $css = $graph\->css(); +.Ve +.PP +Return \s-1CSS\s0 code for that graph. See \fIas_html()\fR. +.SS "\fIas_txt()\fP" +.IX Subsection "as_txt()" +.Vb 1 +\& print $graph\->as_txt(); +.Ve +.PP +Return the graph as a normalized textual representation, that can be +parsed with Graph::Easy::Parser back to the same graph. +.PP +This does not call \fIlayout()\fR since the actual text representation +is just a dump of the graph. +.SS "\fIas_txt_file()\fP" +.IX Subsection "as_txt_file()" +.Vb 1 +\& print $graph\->as_txt_file(); +.Ve +.PP +Is an alias for \fIas_txt()\fR. +.SS "\fIas_svg()\fP" +.IX Subsection "as_svg()" +.Vb 1 +\& print $graph\->as_svg(); +.Ve +.PP +Return the graph as \s-1SVG\s0 (Scalable Vector Graphics), which can be +embedded into \s-1HTML\s0 pages. You need to install +Graph::Easy::As_svg first to make this work. +.PP +See also \fIas_svg_file()\fR. +.PP +\&\fBNote:\fR You need Graph::Easy::As_svg installed for this to work! +.SS "\fIas_svg_file()\fP" +.IX Subsection "as_svg_file()" +.Vb 1 +\& print $graph\->as_svg_file(); +.Ve +.PP +Returns \s-1SVG\s0 just like \f(CW\*(C`as_svg()\*(C'\fR, but this time as standalone \s-1SVG\s0, +suitable for storing it in a file and referencing it externally. +.PP +After calling \f(CW\*(C`as_svg_file()\*(C'\fR or \f(CW\*(C`as_svg()\*(C'\fR, you can retrieve +some \s-1SVG\s0 information, notable \f(CW\*(C`width\*(C'\fR and \f(CW\*(C`height\*(C'\fR via +\&\f(CW\*(C`svg_information\*(C'\fR. +.PP +\&\fBNote:\fR You need Graph::Easy::As_svg installed for this to work! +.SS "\fIsvg_information()\fP" +.IX Subsection "svg_information()" +.Vb 1 +\& my $info = $graph\->svg_information(); +\& +\& print "Size: $info\->{width}, $info\->{height}\en"; +.Ve +.PP +Return information about the graph created by the last +\&\f(CW\*(C`as_svg()\*(C'\fR or \f(CW\*(C`as_svg_file()\*(C'\fR call. +.PP +The following fields are set: +.PP +.Vb 2 +\& width width of the SVG in pixels +\& height height of the SVG in pixels +.Ve +.PP +\&\fBNote:\fR You need Graph::Easy::As_svg installed for this to work! +.SS "\fIas_vcg()\fP" +.IX Subsection "as_vcg()" +.Vb 1 +\& print $graph\->as_vcg(); +.Ve +.PP +Return the graph as \s-1VCG\s0 text. \s-1VCG\s0 is a subset of \s-1GDL\s0 (Graph Description +Language). +.PP +This does not call \fIlayout()\fR since the actual text representation +is just a dump of the graph. +.SS "\fIas_vcg_file()\fP" +.IX Subsection "as_vcg_file()" +.Vb 1 +\& print $graph\->as_vcg_file(); +.Ve +.PP +Is an alias for \fIas_vcg()\fR. +.SS "\fIas_gdl()\fP" +.IX Subsection "as_gdl()" +.Vb 1 +\& print $graph\->as_gdl(); +.Ve +.PP +Return the graph as \s-1GDL\s0 (Graph Description Language) text. \s-1GDL\s0 is a superset +of \s-1VCG\s0. +.PP +This does not call \fIlayout()\fR since the actual text representation +is just a dump of the graph. +.SS "\fIas_gdl_file()\fP" +.IX Subsection "as_gdl_file()" +.Vb 1 +\& print $graph\->as_gdl_file(); +.Ve +.PP +Is an alias for \fIas_gdl()\fR. +.SS "\fIas_graphml()\fP" +.IX Subsection "as_graphml()" +.Vb 1 +\& print $graph\->as_graphml(); +.Ve +.PP +Return the graph as a GraphML representation. +.PP +This does not call \fIlayout()\fR since the actual text representation +is just a dump of the graph. +.PP +The output contains only the set attributes, e.g. default attribute values +are not specifically mentioned. The attribute names and values are the +in the format that \f(CW\*(C`Graph::Easy\*(C'\fR defines. +.SS "\fIas_graphml_file()\fP" +.IX Subsection "as_graphml_file()" +.Vb 1 +\& print $graph\->as_graphml_file(); +.Ve +.PP +Is an alias for \fIas_graphml()\fR. +.SS "\fIsorted_nodes()\fP" +.IX Subsection "sorted_nodes()" +.Vb 6 +\& my $nodes = +\& $graph\->sorted_nodes( ); # default sort on \*(Aqid\*(Aq +\& my $nodes = +\& $graph\->sorted_nodes( \*(Aqname\*(Aq ); # sort on \*(Aqname\*(Aq +\& my $nodes = +\& $graph\->sorted_nodes( \*(Aqlayer\*(Aq, \*(Aqid\*(Aq ); # sort on \*(Aqlayer\*(Aq, then on \*(Aqid\*(Aq +.Ve +.PP +In scalar context, returns the number of nodes/vertices the graph has. +In list context returns a list of all the node objects (as reference), +sorted by their attribute(s) given as arguments. The default is 'id', +e.g. their internal \s-1ID\s0 number, which amounts more or less to the order +they have been inserted. +.PP +This routine will sort the nodes by their group first, so the requested +sort order will be only valid if there are no groups or inside each +group. +.SS "\fIas_debug()\fP" +.IX Subsection "as_debug()" +.Vb 1 +\& print $graph\->as_debug(); +.Ve +.PP +Return debugging information like version numbers of used modules, +and a textual representation of the graph. +.PP +This does not call \fIlayout()\fR since the actual text representation +is more a dump of the graph, than a certain layout. +.SS "\fInode()\fP" +.IX Subsection "node()" +.Vb 1 +\& my $node = $graph\->node(\*(Aqnode name\*(Aq); +.Ve +.PP +Return node by unique name (case sensitive). Returns undef if the node +does not exist in the graph. +.SS "\fIedge()\fP" +.IX Subsection "edge()" +.Vb 1 +\& my $edge = $graph\->edge( $x, $y ); +.Ve +.PP +Returns the edge objects between nodes \f(CW$x\fR and \f(CW$y\fR. Both \f(CW$x\fR and \f(CW$y\fR +can be either scalars with names or \f(CW\*(C`Graph::Easy::Node\*(C'\fR objects. +.PP +Returns undef if the edge does not yet exist. +.PP +In list context it will return all edges from \f(CW$x\fR to \f(CW$y\fR, in +scalar context it will return only one (arbitrary) edge. +.SS "\fIid()\fP" +.IX Subsection "id()" +.Vb 2 +\& my $graph_id = $graph\->id(); +\& $graph\->id(\*(Aq123\*(Aq); +.Ve +.PP +Returns the id of the graph. You can also set a new \s-1ID\s0 with this routine. The +default is ''. +.PP +The graph's \s-1ID\s0 is used to generate unique \s-1CSS\s0 classes for each graph, in the +case you want to have more than one graph in an \s-1HTML\s0 page. +.SS "\fIseed()\fP" +.IX Subsection "seed()" +.Vb 2 +\& my $seed = $graph\->seed(); +\& $graph\->seed(2); +.Ve +.PP +Get/set the random seed for the graph object. See \fIrandomize()\fR +for a method to set a random seed. +.PP +The seed is used to create random numbers for the layouter. For +the same graph, the same seed will always lead to the same layout. +.SS "\fIrandomize()\fP" +.IX Subsection "randomize()" +.Vb 1 +\& $graph\->randomize(); +.Ve +.PP +Set a random seed for the graph object. See \fIseed()\fR. +.SS "\fIdebug()\fP" +.IX Subsection "debug()" +.Vb 3 +\& my $debug = $graph\->debug(); # get +\& $graph\->debug(1); # enable +\& $graph\->debug(0); # disable +.Ve +.PP +Enable, disable or read out the debug status. When the debug status is true, +additional debug messages will be printed on \s-1STDERR\s0. +.SS "\fIscore()\fP" +.IX Subsection "score()" +.Vb 1 +\& my $score = $graph\->score(); +.Ve +.PP +Returns the score of the graph, or undef if \fIlayout()\fR has not yet been called. +.PP +Higher scores are better, although you cannot compare scores for different +graphs. The score should only be used to compare different layouts of the same +graph against each other: +.PP +.Vb 1 +\& my $max = undef; +\& +\& $graph\->randomize(); +\& my $seed = $graph\->seed(); +\& +\& $graph\->layout(); +\& $max = $graph\->score(); +\& +\& for (1..10) +\& { +\& $graph\->randomize(); # select random seed +\& $graph\->layout(); # layout with that seed +\& if ($graph\->score() > $max) +\& { +\& $max = $graph\->score(); # store the new max store +\& $seed = $graph\->seed(); # and it\*(Aqs seed +\& } +\& } +\& +\& # redo the best layout +\& if ($seed ne $graph\->seed()) +\& { +\& $graph\->seed($seed); +\& $graph\->layout(); +\& } +\& # output graph: +\& print $graph\->as_ascii(); # or as_html() etc +.Ve +.SS "\fIvalid_attribute()\fP" +.IX Subsection "valid_attribute()" +.Vb 3 +\& my $graph = Graph::Easy\->new(); +\& my $new_value = +\& $graph\->valid_attribute( $name, $value, $class ); +\& +\& if (ref($new_value) eq \*(AqARRAY\*(Aq && @$new_value == 0) +\& { +\& # throw error +\& die ("\*(Aq$name\*(Aq is not a valid attribute name for \*(Aq$class\*(Aq") +\& if $self\->{_warn_on_unused_attributes}; +\& } +\& elsif (!defined $new_value) +\& { +\& # throw error +\& die ("\*(Aq$value\*(Aq is no valid \*(Aq$name\*(Aq for \*(Aq$class\*(Aq"); +\& } +.Ve +.PP +Deprecated, please use \fIvalidate_attribute()\fR. +.PP +Check that a \f(CW\*(C`$name,$value\*(C'\fR pair is a valid attribute in class \f(CW$class\fR, +and returns a new value. +.PP +It returns an array ref if the attribute name is invalid, and undef if the +value is invalid. +.PP +The return value can differ from the passed in value, f.i.: +.PP +.Vb 1 +\& print $graph\->valid_attribute( \*(Aqcolor\*(Aq, \*(Aqred\*(Aq ); +.Ve +.PP +This would print '#ff0000'; +.SS "\fIvalidate_attribute()\fP" +.IX Subsection "validate_attribute()" +.Vb 3 +\& my $graph = Graph::Easy\->new(); +\& my ($rc,$new_name, $new_value) = +\& $graph\->validate_attribute( $name, $value, $class ); +.Ve +.PP +Checks a given attribute name and value (or values, in case of a +value like \*(L"red|green\*(R") for being valid. It returns a new +attribute name (in case of \*(L"font-color\*(R" => \*(L"fontcolor\*(R") and +either a single new attribute, or a list of attribute values +as array ref. +.PP +If \f(CW$rc\fR is defined, it is the error number: +.PP +.Vb 4 +\& 1 unknown attribute name +\& 2 invalid attribute value +\& 4 found multiple attributes, but these arent +\& allowed at this place +.Ve +.SS "\fIcolor_as_hex()\fP" +.IX Subsection "color_as_hex()" +.Vb 4 +\& my $hexred = Graph::Easy\->color_as_hex( \*(Aqred\*(Aq ); +\& my $hexblue = Graph::Easy\->color_as_hex( \*(Aq#0000ff\*(Aq ); +\& my $hexcyan = Graph::Easy\->color_as_hex( \*(Aq#f0f\*(Aq ); +\& my $hexgreen = Graph::Easy\->color_as_hex( \*(Aqrgb(0,255,0)\*(Aq ); +.Ve +.PP +Takes a valid color name or definition (hex, short hex, or \s-1RGB\s0) and returns the +color in hex like \f(CW\*(C`#ff00ff\*(C'\fR. +.ie n .SS "color_value($color_name, $color_scheme)" +.el .SS "color_value($color_name, \f(CW$color_scheme\fP)" +.IX Subsection "color_value($color_name, $color_scheme)" +.Vb 2 +\& my $color = Graph::Easy\->color_name( \*(Aqred\*(Aq ); # #ff0000 +\& print Graph::Easy\->color_name( \*(Aq#ff0000\*(Aq ); # #ff0000 +\& +\& print Graph::Easy\->color_name( \*(Aqsnow\*(Aq, \*(Aqx11\*(Aq ); +.Ve +.PP +Given a color name, returns the color in hex. See color_name +for a list of possible values for the optional \f(CW$color_scheme\fR +parameter. +.ie n .SS "color_name($color_value, $color_scheme)" +.el .SS "color_name($color_value, \f(CW$color_scheme\fP)" +.IX Subsection "color_name($color_value, $color_scheme)" +.Vb 2 +\& my $color = Graph::Easy\->color_name( \*(Aqred\*(Aq ); # red +\& print Graph::Easy\->color_name( \*(Aq#ff0000\*(Aq ); # red +\& +\& print Graph::Easy\->color_name( \*(Aqsnow\*(Aq, \*(Aqx11\*(Aq ); +.Ve +.PP +Takes a hex color value and returns the name of the color. +.PP +The optional parameter is the color scheme, where the following +values are possible: +.PP +.Vb 2 +\& w3c (the default) +\& x11 (what graphviz uses as default) +.Ve +.PP +Plus the following ColorBrewer schemes are supported, see the +online manual for examples and their usage: +.PP +.Vb 1 +\& accent3 accent4 accent5 accent6 accent7 accent8 +\& +\& blues3 blues4 blues5 blues6 blues7 blues8 blues9 +\& +\& brbg3 brbg4 brbg5 brbg6 brbg7 brbg8 brbg9 brbg10 brbg11 +\& +\& bugn3 bugn4 bugn5 bugn6 bugn7 bugn8 bugn9 bupu3 bupu4 bupu5 bupu6 bupu7 +\& bupu8 bupu9 +\& +\& dark23 dark24 dark25 dark26 dark27 dark28 +\& +\& gnbu3 gnbu4 gnbu5 gnbu6 gnbu7 gnbu8 gnbu9 +\& +\& greens3 greens4 greens5 greens6 greens7 greens8 greens9 +\& +\& greys3 greys4 greys5 greys6 greys7 greys8 greys9 +\& +\& oranges3 oranges4 oranges5 oranges6 oranges7 oranges8 oranges9 +\& +\& orrd3 orrd4 orrd5 orrd6 orrd7 orrd8 orrd9 +\& +\& paired3 paired4 paired5 paired6 paired7 paired8 paired9 paired10 paired11 +\& paired12 pastel13 pastel14 pastel15 pastel16 pastel17 pastel18 pastel19 +\& +\& pastel23 pastel24 pastel25 pastel26 pastel27 pastel28 +\& +\& piyg3 piyg4 piyg5 piyg6 piyg7 piyg8 piyg9 piyg10 piyg11 +\& +\& prgn3 prgn4 prgn5 prgn6 prgn7 prgn8 prgn9 prgn10 prgn11 +\& +\& pubu3 pubu4 pubu5 pubu6 pubu7 pubu8 pubu9 +\& +\& pubugn3 pubugn4 pubugn5 pubugn6 pubugn7 pubugn8 pubugn9 +\& +\& puor3 puor4 puor5 puor6 puor7 puor8 puor9 purd3 purd4 purd5 purd6 purd7 purd8 +\& purd9 puor10 puor11 +\& +\& purples3 purples4 purples5 purples6 purples7 purples8 purples9 +\& +\& rdbu10 rdbu11 rdbu3 rdbu4 rdbu5 rdbu6 rdbu7 rdbu8 rdbu9 rdgy3 rdgy4 rdgy5 rdgy6 +\& +\& rdgy7 rdgy8 rdgy9 rdpu3 rdpu4 rdpu5 rdpu6 rdpu7 rdpu8 rdpu9 rdgy10 rdgy11 +\& +\& rdylbu3 rdylbu4 rdylbu5 rdylbu6 rdylbu7 rdylbu8 rdylbu9 rdylbu10 rdylbu11 +\& +\& rdylgn3 rdylgn4 rdylgn5 rdylgn6 rdylgn7 rdylgn8 rdylgn9 rdylgn10 rdylgn11 +\& +\& reds3 reds4 reds5 reds6 reds7 reds8 reds9 +\& +\& set13 set14 set15 set16 set17 set18 set19 set23 set24 set25 set26 set27 set28 +\& set33 set34 set35 set36 set37 set38 set39 +\& +\& set310 set311 set312 +\& +\& spectral3 spectral4 spectral5 spectral6 spectral7 spectral8 spectral9 +\& spectral10spectral11 +\& +\& ylgn3 ylgn4 ylgn5 ylgn6 ylgn7 ylgn8 ylgn9 +\& +\& ylgnbu3 ylgnbu4 ylgnbu5 ylgnbu6 ylgnbu7 ylgnbu8 ylgnbu9 +\& +\& ylorbr3 ylorbr4 ylorbr5 ylorbr6 ylorbr7 ylorbr8 ylorbr9 +\& +\& ylorrd3 ylorrd4 ylorrd5 ylorrd6 ylorrd7 ylorrd8 ylorrd9 +.Ve +.SS "\fIcolor_names()\fP" +.IX Subsection "color_names()" +.Vb 1 +\& my $names = Graph::Easy\->color_names(); +.Ve +.PP +Return a hash with name => value mapping for all known colors. +.SS "\fItext_style()\fP" +.IX Subsection "text_style()" +.Vb 4 +\& if ($graph\->text_style(\*(Aqbold, italic\*(Aq)) +\& { +\& ... +\& } +.Ve +.PP +Checks the given style list for being valid. +.SS "\fItext_styles()\fP" +.IX Subsection "text_styles()" +.Vb 1 +\& my $styles = $graph\->text_styles(); # or $edge\->text_styles() etc. +\& +\& if ($styles\->{\*(Aqitalic\*(Aq}) +\& { +\& print \*(Aqis italic\en\*(Aq; +\& } +.Ve +.PP +Return a hash with the given text-style properties, aka 'underline', 'bold' etc. +.SS "\fItext_styles_as_css()\fP" +.IX Subsection "text_styles_as_css()" +.Vb 1 +\& my $styles = $graph\->text_styles_as_css(); # or $edge\->...() etc. +.Ve +.PP +Return the text styles as a chunk of \s-1CSS\s0 styling that can be embedded into +a \f(CW\*(C` style="" \*(C'\fR parameter. +.SS "\fIuse_class()\fP" +.IX Subsection "use_class()" +.Vb 1 +\& $graph\->use_class(\*(Aqnode\*(Aq, \*(AqGraph::Easy::MyNode\*(Aq); +.Ve +.PP +Override the class to be used to constructs objects when calling +\&\f(CW\*(C`add_edge()\*(C'\fR, \f(CW\*(C`add_group()\*(C'\fR or \f(CW\*(C`add_node()\*(C'\fR. +.PP +The first parameter can be one of the following: +.PP +.Vb 3 +\& node +\& edge +\& group +.Ve +.PP +Please see the documentation about \f(CW\*(C`use_class()\*(C'\fR in \f(CW\*(C`Graph::Easy::Parser\*(C'\fR +for examples and details. +.SS "\fIanimation_as_graph()\fP" +.IX Subsection "animation_as_graph()" +.Vb 2 +\& my $graph_2 = $graph\->animation_as_graph(); +\& print $graph_2\->as_ascii(); +.Ve +.PP +Returns the animation of \f(CW$graph\fR as a graph describing the flow of the +animation. Useful for debugging animation flows. +.SS "\fIadd_cycle()\fP" +.IX Subsection "add_cycle()" +.Vb 1 +\& $graph\->add_cycle(\*(AqA\*(Aq,\*(AqB\*(Aq,\*(AqC\*(Aq); # A \-> B \-> C \-> A +.Ve +.PP +Compatibility method for Graph, adds the edges between each node +and back from the last node to the first. Returns the graph. +.SS "\fIadd_path()\fP" +.IX Subsection "add_path()" +.Vb 1 +\& $graph\->add_path(\*(AqA\*(Aq,\*(AqB\*(Aq,\*(AqC\*(Aq); # A \-> B \-> C +.Ve +.PP +Compatibility method for Graph, adds the edges between each node. +Returns the graph. +.SS "\fIadd_vertex()\fP" +.IX Subsection "add_vertex()" +.Vb 1 +\& $graph\->add_vertex(\*(AqA\*(Aq); +.Ve +.PP +Compatibility method for Graph, adds the node and returns the graph. +.SS "\fIadd_vertices()\fP" +.IX Subsection "add_vertices()" +.Vb 1 +\& $graph\->add_vertices(\*(AqA\*(Aq,\*(AqB\*(Aq); +.Ve +.PP +Compatibility method for Graph, adds these nodes and returns the graph. +.SS "\fIhas_edge()\fP" +.IX Subsection "has_edge()" +.Vb 1 +\& $graph\->has_edge(\*(AqA\*(Aq,\*(AqB\*(Aq); +.Ve +.PP +Compatibility method for Graph, returns true if at least one edge between +A and B exists. +.SS "\fIvertices()\fP" +.IX Subsection "vertices()" +Compatibility method for Graph, returns in scalar context the number +of nodes this graph has, in list context a (arbitrarily sorted) list +of node objects. +.SS "\fIset_vertex_attribute()\fP" +.IX Subsection "set_vertex_attribute()" +.Vb 1 +\& $graph\->set_vertex_attribute( \*(AqA\*(Aq, \*(Aqfill\*(Aq, \*(Aq#deadff\*(Aq ); +.Ve +.PP +Compatibility method for Graph, set the named vertex attribute. +.PP +Please note that this routine will only accept Graph::Easy attribute +names and values. If you want to attach custom attributes, you need to +start their name with 'x\-': +.PP +.Vb 1 +\& $graph\->set_vertex_attribute( \*(AqA\*(Aq, \*(Aqx\-foo\*(Aq, \*(Aqbar\*(Aq ); +.Ve +.SS "\fIget_vertex_attribute()\fP" +.IX Subsection "get_vertex_attribute()" +.Vb 1 +\& my $fill = $graph\->get_vertex_attribute( \*(AqA\*(Aq, \*(Aqfill\*(Aq ); +.Ve +.PP +Compatibility method for Graph, get the named vertex attribute. +.PP +Please note that this routine will only accept Graph::Easy attribute +names. See \fIset_vertex_attribute()\fR. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph, Graph::Convert, Graph::Easy::As_svg, Graph::Easy::Manual and +Graph::Easy::Parser. +.SS "Related Projects" +.IX Subsection "Related Projects" +Graph::Layout::Aesthetic, Graph and Text::Flowchart. +.PP +There is also an very old, unrelated project from ca. 1995, which does something similar. +See http://rw4.cs.uni\-sb.de/users/sander/html/gsvcg1.html <http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.html>. +.PP +Testcases and more examples under: +.PP +<http://bloodgate.com/perl/graph/>. +.SH "LIMITATIONS" +.IX Header "LIMITATIONS" +This module is now quite complete, but there are still some limitations. +Hopefully further development will lift these. +.SS "Scoring" +.IX Subsection "Scoring" +Scoring is not yet implemented, each generated graph will be the same regardless +of the random seed. +.SS "Layouter" +.IX Subsection "Layouter" +The layouter can not yet handle links between groups (or between +a group and a node, or vice versa). These links will thus only +appear in \fIas_graphviz()\fR or \fIas_txt()\fR output. +.SS "Paths" +.IX Subsection "Paths" +.IP "No optimizations" 2 +.IX Item "No optimizations" +In complex graphs, non-optimal layout part like this one might appear: +.Sp +.Vb 9 +\& +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& | Bonn | \-\-> | Berlin | \-\-> ... +\& +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& ^ +\& | +\& | +\& +\-\-\-\-\-\-\-\-\-+ | +\& | Kassel | \-\-\-+ +\& +\-\-\-\-\-\-\-\-\-+ +.Ve +.Sp +A second-stage optimizer that simplifies these layouts is not yet implemented. +.Sp +In addition the general placement/processing strategy as well as the local +strategy might be improved. +.IP "attributes" 2 +.IX Item "attributes" +The following attributes are currently ignored by the layouter: +.Sp +.Vb 3 +\& undirected graphs +\& autosplit/autojoin for edges +\& tail/head label/title/link for edges +.Ve +.IP "groups" 2 +.IX Item "groups" +The layouter is not fully recursive yet, so groups do not properly nest. +.Sp +In addition, links to/from groups are missing, too. +.SS "Output formats" +.IX Subsection "Output formats" +Some output formats are not yet complete in their +implementation. Please see the online manual at +<http://bloodgate.com/perl/graph/manual> under \*(L"Output\*(R" for +details. +.PP + +.IX Xref "graph manual online" +.SH "LICENSE" +.IX Header "LICENSE" +This library is free software; you can redistribute it and/or modify +it under the terms of the \s-1GPL\s0 2.0 or a later version. +.PP +See the \s-1LICENSE\s0 file for a copy of the \s-1GPL\s0. +.PP +This product includes color specifications and designs developed by Cynthia +Brewer (http://colorbrewer.org/). See the \s-1LICENSE\s0 file for the full license +text that applies to these color schemes. +.PP + +.IX Xref "gpl apache-style cynthia brewer colorscheme license" +.SH "NAME CHANGE" +.IX Header "NAME CHANGE" +The package was formerly known as \f(CW\*(C`Graph::Simple\*(C'\fR. The name was changed +for two reasons: +.IP "\(bu" 2 +In graph theory, a \f(CW\*(C`simple\*(C'\fR graph is a special type of graph. This software, +however, supports more than simple graphs. +.IP "\(bu" 2 +Creating graphs should be easy even when the graphs are quite complex. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2008 by Tels <http://bloodgate.com> +.PP + +.IX Xref "tels" diff --git a/lib/perl/man/man3/Graph::Easy::As_ascii.3pm b/lib/perl/man/man3/Graph::Easy::As_ascii.3pm new file mode 100644 index 0000000000000000000000000000000000000000..c517096aa0f3dd770f635fc070719254023fa5c8 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::As_ascii.3pm @@ -0,0 +1,160 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::As_ascii 3" +.TH Graph::Easy::As_ascii 3 "2011-12-23" "perl v5.12.4" "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::Easy::As_ascii \- Generate ASCII art +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& $graph\->add_edge(\*(AqBonn\*(Aq, \*(AqBerlin\*(Aq); +\& +\& print $graph\->as_ascii(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::As_ascii\*(C'\fR contains the code to render Nodes/Edges as +\&\s-1ASCII\s0 art. It is used by Graph::Easy automatically, and there should +be no need to use it directly. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::As_graphml.3pm b/lib/perl/man/man3/Graph::Easy::As_graphml.3pm new file mode 100644 index 0000000000000000000000000000000000000000..cbd87f21ea2be1bd3b3f1cd2ac2620f80bc5df67 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::As_graphml.3pm @@ -0,0 +1,166 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::As_graphml 3" +.TH Graph::Easy::As_graphml 3 "2011-12-23" "perl v5.12.4" "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::Easy::As_graphml \- Generate a GraphML text from a Graph::Easy object +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& $graph\->add_edge (\*(AqBonn\*(Aq, \*(AqBerlin\*(Aq); +\& +\& print $graph\->as_graphml(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::As_graphml\*(C'\fR contains just the code for converting a +Graph::Easy object to a GraphML text. +.SS "Attributes" +.IX Subsection "Attributes" +Attributes are output in the format that \f(CW\*(C`Graph::Easy\*(C'\fR specifies. More +details about the valid attributes and their default values can be found +in the Graph::Easy online manual: +.PP +<http://bloodgate.com/perl/graph/manual/>. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy, <http://graphml.graphdrawing.org/>. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2008 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::As_graphviz.3pm b/lib/perl/man/man3/Graph::Easy::As_graphviz.3pm new file mode 100644 index 0000000000000000000000000000000000000000..4d324634190b72a909b0070dfa344a0f19d249ae --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::As_graphviz.3pm @@ -0,0 +1,171 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::As_graphviz 3" +.TH Graph::Easy::As_graphviz 3 "2011-12-23" "perl v5.12.4" "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::Easy::As_graphviz \- Generate graphviz description from graph object +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $bonn = Graph::Easy::Node\->new( +\& name => \*(AqBonn\*(Aq, +\& ); +\& my $berlin = Graph::Easy::Node\->new( +\& name => \*(AqBerlin\*(Aq, +\& ); +\& +\& $graph\->add_edge ($bonn, $berlin); +\& +\& print $graph\->as_graphviz(); +\& +\& # prints something like: +\& +\& # digraph NAME { Bonn \-> Berlin } +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::As_graphviz\*(C'\fR contains just the code for converting a +Graph::Easy object to a textual description suitable for +feeding it to Graphviz programs like \f(CW\*(C`dot\*(C'\fR. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy, Graph::Easy::Parser::Graphviz. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2008 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::As_txt.3pm b/lib/perl/man/man3/Graph::Easy::As_txt.3pm new file mode 100644 index 0000000000000000000000000000000000000000..d4e004cbfc217a1d641049a6b1b06bd1299f6194 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::As_txt.3pm @@ -0,0 +1,170 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::As_txt 3" +.TH Graph::Easy::As_txt 3 "2011-12-23" "perl v5.12.4" "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::Easy::As_txt \- Generate textual description from graph object +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $bonn = Graph::Easy::Node\->new( +\& name => \*(AqBonn\*(Aq, +\& ); +\& my $berlin = Graph::Easy::Node\->new( +\& name => \*(AqBerlin\*(Aq, +\& ); +\& +\& $graph\->add_edge ($bonn, $berlin); +\& +\& print $graph\->as_txt(); +\& +\& # prints something like: +\& +\& # [ Bonn ] \-> [ Berlin ] +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::As_txt\*(C'\fR contains just the code for converting a +Graph::Easy object to a human-readable textual description. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::As_vcg.3pm b/lib/perl/man/man3/Graph::Easy::As_vcg.3pm new file mode 100644 index 0000000000000000000000000000000000000000..82829cb1d46fb9d86d5b19cd4ac16fac463f8cc7 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::As_vcg.3pm @@ -0,0 +1,180 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::As_vcg 3" +.TH Graph::Easy::As_vcg 3 "2011-12-23" "perl v5.12.4" "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::Easy::As_vcg \- Generate VCG/GDL text from Graph::Easy object +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $bonn = Graph::Easy::Node\->new( +\& name => \*(AqBonn\*(Aq, +\& ); +\& my $berlin = Graph::Easy::Node\->new( +\& name => \*(AqBerlin\*(Aq, +\& ); +\& +\& $graph\->add_edge ($bonn, $berlin); +\& +\& print $graph\->as_vcg(); +.Ve +.PP +This prints something like this: +.PP +.Vb 5 +\& graph: { +\& node: { title: "Bonn" } +\& node: { title: "Berlin" } +\& edge: { sourcename: "Bonn" targetname: "Berlin" } +\& } +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::As_vcg\*(C'\fR contains just the code for converting a +Graph::Easy object to either a \s-1VCG\s0 +or \s-1GDL\s0 textual description. +.PP +Note that the generated format is compatible to \f(CW\*(C`GDL\*(C'\fR aka \fIGraph +Description Language\fR. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy, http://rw4.cs.uni\-sb.de/~sander/html/gsvcg1.html <http://rw4.cs.uni-sb.de/~sander/html/gsvcg1.html>. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004\-2008 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Attributes.3pm b/lib/perl/man/man3/Graph::Easy::Attributes.3pm new file mode 100644 index 0000000000000000000000000000000000000000..43012e002c7e3448cafb64a1200bc75ce0be6ecf --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Attributes.3pm @@ -0,0 +1,165 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Attributes 3" +.TH Graph::Easy::Attributes 3 "2011-12-23" "perl v5.12.4" "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::Easy::Attributes \- Define and check attributes for Graph::Easy +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $hexred = Graph::Easy\->color_as_hex( \*(Aqred\*(Aq ); +\& my ($name, $value) = $graph\->valid_attribute( \*(Aqcolor\*(Aq, \*(Aqred\*(Aq, \*(Aqgraph\*(Aq ); +\& print "$name => $value\en" if !ref($value); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Attributes\*(C'\fR contains the definitions of valid attribute names +and values for Graph::Easy. It is used by both the parser +and by Graph::Easy to check attributes for being valid and well-formed. +.PP +There should be no need to use this module directly. +.PP +For a complete list of attributes and their possible values, please see +Graph::Easy::Manual. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2008 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Base.3pm b/lib/perl/man/man3/Graph::Easy::Base.3pm new file mode 100644 index 0000000000000000000000000000000000000000..769be95df3097780966deabfe5ae9aa64675dc5e --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Base.3pm @@ -0,0 +1,313 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Base 3" +.TH Graph::Easy::Base 3 "2011-12-23" "perl v5.12.4" "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::Easy::Base \- base class for Graph::Easy objects like nodes, edges etc +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 3 +\& package Graph::Easy::My::Node; +\& use Graph::Easy::Base; +\& @ISA = qw/Graph::Easy::Base/; +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +Used automatically and internally by Graph::Easy \- should not be used +directly. +.SH "METHODS" +.IX Header "METHODS" +.SS "\fInew()\fP" +.IX Subsection "new()" +.Vb 1 +\& my $object = Graph::Easy::Base\->new(); +.Ve +.PP +Create a new object, and call \f(CW\*(C`_init()\*(C'\fR on it. +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& $last_error = $object\->error(); +\& +\& $object\->error($error); # set new messags +\& $object\->error(\*(Aq\*(Aq); # clear the error +.Ve +.PP +Returns the last error message, or '' for no error. +.PP +When setting a new error message, \f(CW\*(C`$self\->_croak($error)\*(C'\fR will be called +unless \f(CW\*(C`$object\->no_fatal_errors()\*(C'\fR is true. +.SS "\fIerror_as_html()\fP" +.IX Subsection "error_as_html()" +.Vb 1 +\& my $error = $object\->error_as_html(); +.Ve +.PP +Returns the same error message as \fIerror()\fR, but properly escaped +as \s-1HTML\s0 so it is safe to output to the client. +.SS "\fIwarn()\fP" +.IX Subsection "warn()" +.Vb 1 +\& $object\->warn(\*(AqWarning!\*(Aq); +.Ve +.PP +Warn on \s-1STDERR\s0 with the given message. +.SS "\fIno_fatal_errors()\fP" +.IX Subsection "no_fatal_errors()" +.Vb 1 +\& $object\->no_fatal_errors(1); +.Ve +.PP +Set the flag that determines whether setting an error message +via \f(CW\*(C`error()\*(C'\fR is fatal, e.g. results in a call to \f(CW\*(C`_croak()\*(C'\fR. +.PP +A true value will make errors non-fatal. See also fatal_errors. +.SS "\fIfatal_errors()\fP" +.IX Subsection "fatal_errors()" +.Vb 3 +\& $fatal = $object\->fatal_errors(); +\& $object\->fatal_errors(0); # turn off +\& $object\->fatal_errors(1); # turn on +.Ve +.PP +Set/get the flag that determines whether setting an error message +via \f(CW\*(C`error()\*(C'\fR is fatal, e.g. results in a call to \f(CW\*(C`_croak()\*(C'\fR. +.PP +A true value makes errors fatal. +.SS "\fIcatch_errors()\fP" +.IX Subsection "catch_errors()" +.Vb 2 +\& my $catch_errors = $object\->catch_errors(); # query +\& $object\->catch_errors(1); # enable +\& +\& $object\->...(); # some error +\& if ($object\->error()) +\& { +\& my @errors = $object\->errors(); # retrieve +\& } +.Ve +.PP +Enable/disable catching of all error messages. When enabled, +all previously caught error messages are thrown away, and from this +poin on new errors are non-fatal and stored internally. You can +retrieve these errors later with the \fIerrors()\fR method. +.SS "\fIcatch_warnings()\fP" +.IX Subsection "catch_warnings()" +.Vb 2 +\& my $catch_warns = $object\->catch_warnings(); # query +\& $object\->catch_warnings(1); # enable +\& +\& $object\->...(); # some error +\& if ($object\->warning()) +\& { +\& my @warnings = $object\->warnings(); # retrieve +\& } +.Ve +.PP +Enable/disable catching of all warnings. When enabled, all previously +caught warning messages are thrown away, and from this poin on new +warnings are stored internally. You can retrieve these errors later +with the \fIerrors()\fR method. +.SS "\fIcatch_messages()\fP" +.IX Subsection "catch_messages()" +.Vb 4 +\& # catch errors and warnings +\& $object\->catch_messages(1); +\& # stop catching errors and warnings +\& $object\->catch_messages(0); +.Ve +.PP +A true parameter is equivalent to: +.PP +.Vb 2 +\& $object\->catch_warnings(1); +\& $object\->catch_errors(1); +.Ve +.PP +See also: \fIcatch_warnings()\fR and \fIcatch_errors()\fR as well as +\&\fIerrors()\fR and \fIwarnings()\fR. +.SS "\fIerrors()\fP" +.IX Subsection "errors()" +.Vb 1 +\& my @errors = $object\->errors(); +.Ve +.PP +Return all error messages that occured after \fIcatch_messages()\fR was +called. +.SS "\fIwarnings()\fP" +.IX Subsection "warnings()" +.Vb 1 +\& my @warnings = $object\->warnings(); +.Ve +.PP +Return all warning messages that occured after \fIcatch_messages()\fR +or \fIcatch_errors()\fR was called. +.SS "\fIself()\fP" +.IX Subsection "self()" +.Vb 1 +\& my $self = $object\->self(); +.Ve +.PP +Returns the object itself. +.SS "\fIclass()\fP" +.IX Subsection "class()" +.Vb 1 +\& my $class = $object\->class(); +.Ve +.PP +Returns the full class name like \f(CW\*(C`node.cities\*(C'\fR. See also \f(CW\*(C`sub_class\*(C'\fR. +.SS "\fIsub_class()\fP" +.IX Subsection "sub_class()" +.Vb 1 +\& my $sub_class = $object\->sub_class(); +.Ve +.PP +Returns the sub class name like \f(CW\*(C`cities\*(C'\fR. See also \f(CW\*(C`class\*(C'\fR. +.SS "\fImain_class()\fP" +.IX Subsection "main_class()" +.Vb 1 +\& my $main_class = $object\->main_class(); +.Ve +.PP +Returns the main class name like \f(CW\*(C`node\*(C'\fR. See also \f(CW\*(C`sub_class\*(C'\fR. +.SH "EXPORT" +.IX Header "EXPORT" +None by default. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2008 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. +.PP + +.IX Xref "tels bloodgate license gpl" diff --git a/lib/perl/man/man3/Graph::Easy::Edge.3pm b/lib/perl/man/man3/Graph::Easy::Edge.3pm new file mode 100644 index 0000000000000000000000000000000000000000..2d7c602e642e8485aecd187a89c068fd4b10e953 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Edge.3pm @@ -0,0 +1,391 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Edge 3" +.TH Graph::Easy::Edge 3 "2011-12-23" "perl v5.12.4" "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::Easy::Edge \- An edge (a path connecting one ore more nodes) +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $ssl = Graph::Easy::Edge\->new( +\& label => \*(Aqencrypted connection\*(Aq, +\& style => \*(Aqsolid\*(Aq, +\& ); +\& $ssl\->set_attribute(\*(Aqcolor\*(Aq, \*(Aqred\*(Aq); +\& +\& my $src = Graph::Easy::Node\->new(\*(Aqsource\*(Aq); +\& +\& my $dst = Graph::Easy::Node\->new(\*(Aqdestination\*(Aq); +\& +\& $graph = Graph::Easy\->new(); +\& +\& $graph\->add_edge($src, $dst, $ssl); +\& +\& print $graph\->as_ascii(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Edge\*(C'\fR represents an edge between two (or more) nodes in a +simple graph. +.PP +Each edge has a direction (from source to destination, or back and forth), +plus a style (line width and style), colors etc. It can also have a label, +e.g. a text associated with it. +.PP +During the layout phase, each edge also contains a list of path-elements +(also called cells), which make up the path from source to destination. +.SH "METHODS" +.IX Header "METHODS" +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& $last_error = $edge\->error(); +\& +\& $cvt\->error($error); # set new messags +\& $cvt\->error(\*(Aq\*(Aq); # clear error +.Ve +.PP +Returns the last error message, or '' for no error. +.SS "\fIas_ascii()\fP" +.IX Subsection "as_ascii()" +.Vb 1 +\& my $ascii = $edge\->as_ascii(); +.Ve +.PP +Returns the edge as a little ascii representation. +.SS "\fIas_txt()\fP" +.IX Subsection "as_txt()" +.Vb 1 +\& my $txt = $edge\->as_txt(); +.Ve +.PP +Returns the edge as a little Graph::Easy textual representation. +.SS "\fIlabel()\fP" +.IX Subsection "label()" +.Vb 1 +\& my $label = $edge\->label(); +.Ve +.PP +Returns the label (also known as 'name') of the edge. +.SS "\fIname()\fP" +.IX Subsection "name()" +.Vb 1 +\& my $label = $edge\->name(); +.Ve +.PP +To make the interface more consistent, the \f(CW\*(C`name()\*(C'\fR method of +an edge can also be called, and it will returned either the edge +label, or the empty string if the edge doesn't have a label. +.SS "\fIstyle()\fP" +.IX Subsection "style()" +.Vb 1 +\& my $style = $edge\->style(); +.Ve +.PP +Returns the style of the edge, like 'solid', 'dotted', 'double', etc. +.SS "\fInodes()\fP" +.IX Subsection "nodes()" +.Vb 1 +\& my @nodes = $edge\->nodes(); +.Ve +.PP +Returns the source and target node that this edges connects as objects. +.SS "\fIbidirectional()\fP" +.IX Subsection "bidirectional()" +.Vb 4 +\& $edge\->bidirectional(1); +\& if ($edge\->bidirectional()) +\& { +\& } +.Ve +.PP +Returns true if the edge is bidirectional, aka has arrow heads on both ends. +An optional parameter will set the bidirectional status of the edge. +.SS "\fIundirected()\fP" +.IX Subsection "undirected()" +.Vb 4 +\& $edge\->undirected(1); +\& if ($edge\->undirected()) +\& { +\& } +.Ve +.PP +Returns true if the edge is undirected, aka has now arrow at all. +An optional parameter will set the undirected status of the edge. +.SS "\fIhas_ports()\fP" +.IX Subsection "has_ports()" +.Vb 4 +\& if ($edge\->has_ports()) +\& { +\& ... +\& } +.Ve +.PP +Return true if the edge has restriction on the starting or ending +port, e.g. either the \f(CW\*(C`start\*(C'\fR or \f(CW\*(C`end\*(C'\fR attribute is set on +this edge. +.SS "\fIstart_port()\fP" +.IX Subsection "start_port()" +.Vb 1 +\& my $port = $edge\->start_port(); +.Ve +.PP +Return undef if the edge does not have a fixed start port, otherwise +returns the port as \*(L"side, number\*(R", for example \*(L"south, 0\*(R". +.SS "\fIend_port()\fP" +.IX Subsection "end_port()" +.Vb 1 +\& my $port = $edge\->end_port(); +.Ve +.PP +Return undef if the edge does not have a fixed end port, otherwise +returns the port as \*(L"side, number\*(R", for example \*(L"south, 0\*(R". +.SS "\fIfrom()\fP" +.IX Subsection "from()" +.Vb 1 +\& my $from = $edge\->from(); +.Ve +.PP +Returns the node that this edge starts at. See also \f(CW\*(C`to()\*(C'\fR. +.SS "\fIto()\fP" +.IX Subsection "to()" +.Vb 1 +\& my $to = $edge\->to(); +.Ve +.PP +Returns the node that this edge leads to. See also \f(CW\*(C`from()\*(C'\fR. +.SS "\fIstart_at()\fP" +.IX Subsection "start_at()" +.Vb 2 +\& $edge\->start_at($other); +\& my $other = $edge\->start_at(\*(Aqsome node\*(Aq); +.Ve +.PP +Set the edge's start point to the given node. If given a node name, +will add that node to the graph first. +.PP +Returns the new edge start point node. +.SS "\fIend_at()\fP" +.IX Subsection "end_at()" +.Vb 2 +\& $edge\->end_at($other); +\& my $other = $edge\->end_at(\*(Aqsome other node\*(Aq); +.Ve +.PP +Set the edge's end point to the given node. If given a node name, +will add that node to the graph first. +.PP +Returns the new edge end point node. +.SS "\fIflip()\fP" +.IX Subsection "flip()" +.Vb 1 +\& $edge\->flip(); +.Ve +.PP +Swaps the \f(CW\*(C`start\*(C'\fR and \f(CW\*(C`end\*(C'\fR nodes on this edge, e.g. reverses the direction +of the edge. +.PP + +.IX Xref "transpose" +.SS "\fIflow()\fP" +.IX Subsection "flow()" +.Vb 1 +\& my $flow = $edge\->flow(); +.Ve +.PP +Returns the flow for this edge, honoring inheritance. An edge without +a specific flow set will inherit the flow from the node it comes from. +.SS "\fIedge_flow()\fP" +.IX Subsection "edge_flow()" +.Vb 1 +\& my $flow = $edge\->edge_flow(); +.Ve +.PP +Returns the flow for this edge, or undef if it has none set on either +the object itself or its class. +.SS "\fIport()\fP" +.IX Subsection "port()" +.Vb 2 +\& my ($side, $number) = $edge\->port(\*(Aqstart\*(Aq); +\& my ($side, $number) = $edge\->port(\*(Aqend\*(Aq); +.Ve +.PP +Return the side and port number where this edge starts or ends. +.PP +Returns undef for \f(CW$side\fR if the edge has no port restriction. The +returned side will be one absolute direction of \f(CW\*(C`east\*(C'\fR, \f(CW\*(C`west\*(C'\fR, +\&\f(CW\*(C`north\*(C'\fR or \f(CW\*(C`south\*(C'\fR, depending on the port restriction and +flow at that edge. +.SS "\fIget_attributes()\fP" +.IX Subsection "get_attributes()" +.Vb 1 +\& my $att = $object\->get_attributes(); +.Ve +.PP +Return all effective attributes on this object (graph/node/group/edge) as +an anonymous hash ref. This respects inheritance and default values. +.PP +See also \fIraw_attributes()\fR. +.SS "\fIraw_attributes()\fP" +.IX Subsection "raw_attributes()" +.Vb 1 +\& my $att = $object\->get_attributes(); +.Ve +.PP +Return all set attributes on this object (graph/node/group/edge) as +an anonymous hash ref. This respects inheritance, but does not include +default values for unset attributes. +.PP +See also \fIget_attributes()\fR. +.SS "attribute related methods" +.IX Subsection "attribute related methods" +You can call all the various attribute related methods like \f(CW\*(C`set_attribute()\*(C'\fR, +\&\f(CW\*(C`get_attribute()\*(C'\fR, etc. on an edge, too. For example: +.PP +.Vb 3 +\& $edge\->set_attribute(\*(Aqlabel\*(Aq, \*(Aqby train\*(Aq); +\& my $attr = $edge\->get_attributes(); +\& my $raw_attr = $edge\->raw_attributes(); +.Ve +.PP +You can find more documentation in Graph::Easy. +.SH "EXPORT" +.IX Header "EXPORT" +None by default. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2008 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Edge::Cell.3pm b/lib/perl/man/man3/Graph::Easy::Edge::Cell.3pm new file mode 100644 index 0000000000000000000000000000000000000000..a15898c9ac7c574367bf6144a0dd4e50c6965c1a --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Edge::Cell.3pm @@ -0,0 +1,273 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Edge::Cell 3" +.TH Graph::Easy::Edge::Cell 3 "2011-12-23" "perl v5.12.4" "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::Easy::Edge::Cell \- A cell in an edge in Graph::Easy +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $ssl = Graph::Easy::Edge\->new( +\& label => \*(Aqencrypted connection\*(Aq, +\& style => \*(Aqsolid\*(Aq, +\& color => \*(Aqred\*(Aq, +\& ); +\& my $src = Graph::Easy::Node\->new( \*(Aqsource\*(Aq ); +\& my $dst = Graph::Easy::Node\->new( \*(Aqdestination\*(Aq ); +\& +\& $graph = Graph::Easy\->new(); +\& +\& $graph\->add_edge($src, $dst, $ssl); +\& +\& print $graph\->as_ascii(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Edge::Cell\*(C'\fR represents an edge between two (or more) nodes +in a simple graph. +.PP +Each edge has a direction (from source to destination, or back and forth), +plus a style (line width and style), colors etc. It can also have a name, +e.g. a text label associated with it. +.PP +There should be no need to use this package directly. +.SH "METHODS" +.IX Header "METHODS" +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& $last_error = $edge\->error(); +\& +\& $cvt\->error($error); # set new messags +\& $cvt\->error(\*(Aq\*(Aq); # clear error +.Ve +.PP +Returns the last error message, or '' for no error. +.SS "\fIas_ascii()\fP" +.IX Subsection "as_ascii()" +.Vb 1 +\& my $ascii = $path\->as_ascii(); +.Ve +.PP +Returns the path-cell as a little ascii representation. +.SS "\fIas_html()\fP" +.IX Subsection "as_html()" +.Vb 1 +\& my $html = $path\->as_html($tag,$id); +.Ve +.PP +eturns the path-cell as \s-1HTML\s0 code. +.SS "\fIlabel()\fP" +.IX Subsection "label()" +.Vb 1 +\& my $label = $path\->label(); +.Ve +.PP +Returns the name (also known as 'label') of the path-cell. +.SS "\fIstyle()\fP" +.IX Subsection "style()" +.Vb 1 +\& my $style = $edge\->style(); +.Ve +.PP +Returns the style of the edge. +.SH "EXPORT" +.IX Header "EXPORT" +None by default. Can export the following on request: +.PP +.Vb 4 +\& EDGE_START_E +\& EDGE_START_W +\& EDGE_START_N +\& EDGE_START_S +\& +\& EDGE_END_E +\& EDGE_END_W +\& EDGE_END_N +\& EDGE_END_S +\& +\& EDGE_SHORT_E +\& EDGE_SHORT_W +\& EDGE_SHORT_N +\& EDGE_SHORT_S +\& +\& EDGE_SHORT_BD_EW +\& EDGE_SHORT_BD_NS +\& +\& EDGE_SHORT_UN_EW +\& EDGE_SHORT_UN_NS +\& +\& EDGE_HOR +\& EDGE_VER +\& EDGE_CROSS +\& +\& EDGE_N_E +\& EDGE_N_W +\& EDGE_S_E +\& EDGE_S_W +\& +\& EDGE_S_E_W +\& EDGE_N_E_W +\& EDGE_E_N_S +\& EDGE_W_N_S +\& +\& EDGE_LOOP_NORTH +\& EDGE_LOOP_SOUTH +\& EDGE_LOOP_EAST +\& EDGE_LOOP_WEST +\& +\& EDGE_N_W_S +\& EDGE_S_W_N +\& EDGE_E_S_W +\& EDGE_W_S_E +\& +\& EDGE_TYPE_MASK +\& EDGE_FLAG_MASK +\& EDGE_ARROW_MASK +\& +\& EDGE_START_MASK +\& EDGE_END_MASK +\& EDGE_MISC_MASK +\& +\& ARROW_RIGHT +\& ARROW_LEFT +\& ARROW_UP +\& ARROW_DOWN +.Ve +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Group.3pm b/lib/perl/man/man3/Graph::Easy::Group.3pm new file mode 100644 index 0000000000000000000000000000000000000000..a6c20cee6165fee5c198953d11ce35a214cc007c --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Group.3pm @@ -0,0 +1,438 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Group 3" +.TH Graph::Easy::Group 3 "2011-12-23" "perl v5.12.4" "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::Easy::Group \- A group of nodes (aka subgraph) in Graph::Easy +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $bonn = Graph::Easy::Node\->new(\*(AqBonn\*(Aq); +\& +\& $bonn\->set_attribute(\*(Aqborder\*(Aq, \*(Aqsolid 1px black\*(Aq); +\& +\& my $berlin = Graph::Easy::Node\->new( name => \*(AqBerlin\*(Aq ); +\& +\& my $cities = Graph::Easy::Group\->new( +\& name => \*(AqCities\*(Aq, +\& ); +\& $cities\->set_attribute(\*(Aqborder\*(Aq, \*(Aqdashed 1px blue\*(Aq); +\& +\& $cities\->add_nodes ($bonn); +\& # $bonn will be ONCE in the group +\& $cities\->add_nodes ($bonn, $berlin); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Group\*(C'\fR represents a group of nodes in an \f(CW\*(C`Graph::Easy\*(C'\fR +object. These nodes are grouped together on output. +.SH "METHODS" +.IX Header "METHODS" +.SS "\fInew()\fP" +.IX Subsection "new()" +.Vb 1 +\& my $group = Graph::Easy::Group\->new( $options ); +.Ve +.PP +Create a new, empty group. \f(CW$options\fR are the possible options, see +Graph::Easy::Node for a list. +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& $last_error = $group\->error(); +\& +\& $group\->error($error); # set new messags +\& $group\->error(\*(Aq\*(Aq); # clear error +.Ve +.PP +Returns the last error message, or '' for no error. +.SS "\fIas_ascii()\fP" +.IX Subsection "as_ascii()" +.Vb 1 +\& my $ascii = $group\->as_ascii(); +.Ve +.PP +Return the group as a little box drawn in \s-1ASCII\s0 art as a string. +.SS "\fIname()\fP" +.IX Subsection "name()" +.Vb 1 +\& my $name = $group\->name(); +.Ve +.PP +Return the name of the group. +.SS "\fIid()\fP" +.IX Subsection "id()" +.Vb 1 +\& my $id = $group\->id(); +.Ve +.PP +Returns the group's unique \s-1ID\s0 number. +.SS "\fIset_attribute()\fP" +.IX Subsection "set_attribute()" +.Vb 1 +\& $group\->set_attribute(\*(Aqborder\-style\*(Aq, \*(Aqnone\*(Aq); +.Ve +.PP +Sets the specified attribute of this (and only this!) group to the +specified value. +.SS "\fIadd_member()\fP" +.IX Subsection "add_member()" +.Vb 2 +\& $group\->add_member($node); +\& $group\->add_member($group); +.Ve +.PP +Add the specified object to this group and returns this member. If the +passed argument is a scalar, will treat it as a node name. +.PP +Note that each object can only be a member of one group at a time. +.SS "\fIadd_node()\fP" +.IX Subsection "add_node()" +.Vb 1 +\& $group\->add_node($node); +.Ve +.PP +Add the specified node to this group and returns this node. +.PP +Note that each object can only be a member of one group at a time. +.SS "\fIadd_edge()\fP, \fIadd_edge_once()\fP" +.IX Subsection "add_edge(), add_edge_once()" +.Vb 4 +\& $group\->add_edge($edge); # Graph::Easy::Edge +\& $group\->add_edge($from, $to); # Graph::Easy::Node or +\& # Graph::Easy::Group +\& $group\->add_edge(\*(AqFrom\*(Aq, \*(AqTo\*(Aq); # Scalars +.Ve +.PP +If passed an Graph::Easy::Edge object, moves the nodes involved in +this edge to the group. +.PP +if passed two nodes, adds these nodes to the graph (unless they already +exist) and adds an edge between these two nodes. See \fIadd_edge_once()\fR +to avoid creating multiple edges. +.PP +This method works only on groups that are part of a graph. +.PP +Note that each object can only be a member of one group at a time, +and edges are automatically a member of a group if and only if both +the target and the destination node are a member of the same group. +.SS "\fIadd_group()\fP" +.IX Subsection "add_group()" +.Vb 2 +\& my $inner = $group\->add_group(\*(AqGroup name\*(Aq); +\& my $nested = $group\->add_group($group); +.Ve +.PP +Add a group as subgroup to this group and returns this group. +.SS "\fIdel_member()\fP" +.IX Subsection "del_member()" +.Vb 2 +\& $group\->del_member($node); +\& $group\->del_member($group); +.Ve +.PP +Delete the specified object from this group. +.SS "\fIdel_node()\fP" +.IX Subsection "del_node()" +.Vb 1 +\& $group\->del_node($node); +.Ve +.PP +Delete the specified node from this group. +.SS "\fIdel_edge()\fP" +.IX Subsection "del_edge()" +.Vb 1 +\& $group\->del_edge($edge); +.Ve +.PP +Delete the specified edge from this group. +.SS "\fIadd_nodes()\fP" +.IX Subsection "add_nodes()" +.Vb 1 +\& $group\->add_nodes($node, $node2, ... ); +.Ve +.PP +Add all the specified nodes to this group and returns them as a list. +.SS "\fInodes()\fP" +.IX Subsection "nodes()" +.Vb 1 +\& my @nodes = $group\->nodes(); +.Ve +.PP +Returns a list of all node objects that belong to this group. +.SS "\fIedges()\fP" +.IX Subsection "edges()" +.Vb 1 +\& my @edges = $group\->edges(); +.Ve +.PP +Returns a list of all edge objects that lead to or from this group. +.PP +Note: This does \fBnot\fR return edges between nodes that are inside the group, +for this see \fIedges_within()\fR. +.SS "\fIedges_within()\fP" +.IX Subsection "edges_within()" +.Vb 1 +\& my @edges_within = $group\->edges_within(); +.Ve +.PP +Returns a list of all edge objects that are \fIinside\fR this group, in arbitrary +order. Edges are automatically considered \fIinside\fR a group if their starting +and ending node both are in the same group. +.PP +Note: This does \fBnot\fR return edges between this group and other groups, +nor edges between this group and nodes outside this group, for this see +\&\fIedges()\fR. +.SS "\fIgroups()\fP" +.IX Subsection "groups()" +.Vb 1 +\& my @groups = $group\->groups(); +.Ve +.PP +Returns the contained groups of this group as Graph::Easy::Group objects, +in arbitrary order. +.SS "\fIgroups_within()\fP" +.IX Subsection "groups_within()" +.Vb 3 +\& # equivalent to $group\->groups(): +\& my @groups = $group\->groups_within(); # all +\& my @toplevel_groups = $group\->groups_within(0); # level 0 only +.Ve +.PP +Return the groups that are inside this group, up to the specified level, +in arbitrary order. +.PP +The default level is \-1, indicating no bounds and thus all contained +groups are returned. +.PP +A level of 0 means only the direct children, and hence only the toplevel +groups will be returned. A level 1 means the toplevel groups and their +toplevel children, and so on. +.SS "\fIas_txt()\fP" +.IX Subsection "as_txt()" +.Vb 1 +\& my $txt = $group\->as_txt(); +.Ve +.PP +Returns the group as Graph::Easy textual description. +.SS "\fI_find_label_cell()\fP" +.IX Subsection "_find_label_cell()" +.Vb 1 +\& $group\->_find_label_cell(); +.Ve +.PP +Called by the layouter once for each group. Goes through all cells of this +group and finds one where to attach the label to. Internal usage only. +.SS "\fIget_attributes()\fP" +.IX Subsection "get_attributes()" +.Vb 1 +\& my $att = $object\->get_attributes(); +.Ve +.PP +Return all effective attributes on this object (graph/node/group/edge) as +an anonymous hash ref. This respects inheritance and default values. +.PP +See also \fIraw_attributes()\fR. +.SS "\fIraw_attributes()\fP" +.IX Subsection "raw_attributes()" +.Vb 1 +\& my $att = $object\->get_attributes(); +.Ve +.PP +Return all set attributes on this object (graph/node/group/edge) as +an anonymous hash ref. This respects inheritance, but does not include +default values for unset attributes. +.PP +See also \fIget_attributes()\fR. +.SS "attribute related methods" +.IX Subsection "attribute related methods" +You can call all the various attribute related methods like \f(CW\*(C`set_attribute()\*(C'\fR, +\&\f(CW\*(C`get_attribute()\*(C'\fR, etc. on a group, too. For example: +.PP +.Vb 2 +\& $group\->set_attribute(\*(Aqlabel\*(Aq, \*(Aqby train\*(Aq); +\& my $attr = $group\->get_attributes(); +.Ve +.PP +You can find more documentation in Graph::Easy. +.SS "\fIlayout()\fP" +.IX Subsection "layout()" +This routine should not be called on groups, it only works on the graph +itself. +.SS "\fIshape()\fP" +.IX Subsection "shape()" +.Vb 1 +\& my $shape = $group\->shape(); +.Ve +.PP +Returns the shape of the group as string. +.SS "\fIhas_as_successor()\fP" +.IX Subsection "has_as_successor()" +.Vb 4 +\& if ($group\->has_as_successor($other)) +\& { +\& ... +\& } +.Ve +.PP +Returns true if \f(CW$other\fR (a node or group) is a successor of this group, e.g. +if there is an edge leading from this group to \f(CW$other\fR. +.SS "\fIhas_as_predecessor()\fP" +.IX Subsection "has_as_predecessor()" +.Vb 4 +\& if ($group\->has_as_predecessor($other)) +\& { +\& ... +\& } +.Ve +.PP +Returns true if the group has \f(CW$other\fR (a group or node) as predecessor, that +is if there is an edge leading from \f(CW$other\fR to this group. +.SS "\fIroot_node()\fP" +.IX Subsection "root_node()" +.Vb 1 +\& my $root = $group\->root_node(); +.Ve +.PP +Return the root node as Graph::Easy::Node object, if it was +set with the 'root' attribute. +.SH "EXPORT" +.IX Header "EXPORT" +None by default. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy, Graph::Easy::Node, Graph::Easy::Manual. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2008 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Group::Anon.3pm b/lib/perl/man/man3/Graph::Easy::Group::Anon.3pm new file mode 100644 index 0000000000000000000000000000000000000000..460fd8e909a8523efb289cdb9122e6c367ba3d72 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Group::Anon.3pm @@ -0,0 +1,164 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Group::Anon 3" +.TH Graph::Easy::Group::Anon 3 "2011-12-23" "perl v5.12.4" "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::Easy::Group::Anon \- An anonymous group of nodes in Graph::Easy +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy::Group::Anon; +\& +\& my $anon = Graph::Easy::Group::Anon\->new(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Group::Anon\*(C'\fR represents an anonymous group of nodes, +e.g. a group without a name. +.PP +The syntax in the Graph::Easy textual description language looks like this: +.PP +.Vb 1 +\& ( [ Bonn ] \-> [ Berlin ] ) +.Ve +.PP +This module is loaded and used automatically by Graph::Easy, so there is +no need to use it manually. +.SH "EXPORT" +.IX Header "EXPORT" +None by default. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy::Group. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2006 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Group::Cell.3pm b/lib/perl/man/man3/Graph::Easy::Group::Cell.3pm new file mode 100644 index 0000000000000000000000000000000000000000..2f3da9f77ecc92fd67d5dc219f0d5e342ff01286 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Group::Cell.3pm @@ -0,0 +1,216 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Group::Cell 3" +.TH Graph::Easy::Group::Cell 3 "2011-12-23" "perl v5.12.4" "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::Easy::Group::Cell \- A cell in a group +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $ssl = Graph::Easy::Edge\->new( ); +\& +\& $ssl\->set_attributes( +\& label => \*(Aqencrypted connection\*(Aq, +\& style => \*(Aq\-\->\*(Aq, +\& color => \*(Aqred\*(Aq, +\& ); +\& +\& $graph = Graph::Easy\->new(); +\& +\& $graph\->add_edge(\*(Aqsource\*(Aq, \*(Aqdestination\*(Aq, $ssl); +\& +\& print $graph\->as_ascii(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Group::Cell\*(C'\fR represents a cell of a group. +.PP +Group cells can have a background and, if they are on the outside, a border. +.PP +There should be no need to use this package directly. +.SH "METHODS" +.IX Header "METHODS" +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& $last_error = $group\->error(); +\& +\& $group\->error($error); # set new messags +\& $group\->error(\*(Aq\*(Aq); # clear error +.Ve +.PP +Returns the last error message, or '' for no error. +.SS "\fIas_ascii()\fP" +.IX Subsection "as_ascii()" +.Vb 1 +\& my $ascii = $cell\->as_ascii(); +.Ve +.PP +Returns the cell as a little ascii representation. +.SS "\fIas_html()\fP" +.IX Subsection "as_html()" +.Vb 1 +\& my $html = $cell\->as_html($tag,$id); +.Ve +.PP +Returns the cell as \s-1HTML\s0 code. +.SS "\fIlabel()\fP" +.IX Subsection "label()" +.Vb 1 +\& my $label = $cell\->label(); +.Ve +.PP +Returns the name (also known as 'label') of the cell. +.SS "\fIclass()\fP" +.IX Subsection "class()" +.Vb 1 +\& my $class = $cell\->class(); +.Ve +.PP +Returns the classname(s) of this cell, like: +.PP +.Vb 1 +\& group_cities gr gb +.Ve +.PP +for a cell with a bottom (gb) and right (gr) border in the class \f(CW\*(C`cities\*(C'\fR. +.SH "EXPORT" +.IX Header "EXPORT" +None. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Layout.3pm b/lib/perl/man/man3/Graph::Easy::Layout.3pm new file mode 100644 index 0000000000000000000000000000000000000000..04a7ef0fec343506860e8336f4619749dbec61ad --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Layout.3pm @@ -0,0 +1,196 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Layout 3" +.TH Graph::Easy::Layout 3 "2011-12-23" "perl v5.12.4" "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::Easy::Layout \- Layout the graph from Graph::Easy +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $bonn = Graph::Easy::Node\->new( +\& name => \*(AqBonn\*(Aq, +\& ); +\& my $berlin = Graph::Easy::Node\->new( +\& name => \*(AqBerlin\*(Aq, +\& ); +\& +\& $graph\->add_edge ($bonn, $berlin); +\& +\& $graph\->layout(); +\& +\& print $graph\->as_ascii( ); +\& +\& # prints: +\& +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& # | Bonn | \-\-> | Berlin | +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Layout\*(C'\fR contains just the actual layout code for +Graph::Easy. +.SH "METHODS" +.IX Header "METHODS" +\&\f(CW\*(C`Graph::Easy::Layout\*(C'\fR injects the following methods into the \f(CW\*(C`Graph::Easy\*(C'\fR +namespace: +.SS "\fIlayout()\fP" +.IX Subsection "layout()" +.Vb 1 +\& $graph\->layout(); +.Ve +.PP +Layout the actual graph. +.SS "\fI_assign_ranks()\fP" +.IX Subsection "_assign_ranks()" +.Vb 1 +\& $graph\->_assign_ranks(); +.Ve +.PP +Used by \f(CW\*(C`layout()\*(C'\fR to assign each node a rank, so they can be sorted +and grouped on these. +.SS "_optimize_layout" +.IX Subsection "_optimize_layout" +Used by \f(CW\*(C`layout()\*(C'\fR to optimize the layout as a last step. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2008 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Layout::Chain.3pm b/lib/perl/man/man3/Graph::Easy::Layout::Chain.3pm new file mode 100644 index 0000000000000000000000000000000000000000..bc9cd364d30f333c82787f02e81144996ca0c78c --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Layout::Chain.3pm @@ -0,0 +1,258 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Layout::Chain 3" +.TH Graph::Easy::Layout::Chain 3 "2011-12-23" "perl v5.12.4" "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::Easy::Layout::Chain \- Chain of nodes for layouter +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& # used internally, do not use directly +\& +\& use Graph::Easy; +\& use Graph::Easy::Layout::Chain; +\& +\& my $graph = Graph::Easy\->new( ); +\& my ($node, $node2) = $graph\->add_edge( \*(AqA\*(Aq, \*(AqB\*(Aq ); +\& +\& my $chain = Graph::Easy::Layout::Chain\->new( +\& start => $node, +\& graph => $graph, ); +\& +\& $chain\->add_node( $node2 ); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Layout::Chain\*(C'\fR object represents a chain of nodes +for the layouter. +.SH "METHODS" +.IX Header "METHODS" +.SS "\fInew()\fP" +.IX Subsection "new()" +.Vb 1 +\& my $chain = Graph::Easy::Layout::Chain\->new( start => $node ); +.Ve +.PP +Create a new chain and set its starting node to \f(CW$node\fR. +.SS "\fIlength()\fP" +.IX Subsection "length()" +.Vb 1 +\& my $len = $chain\->length(); +.Ve +.PP +Return the length of the chain, in nodes. +.PP +.Vb 1 +\& my $len = $chain\->length( $node ); +.Ve +.PP +Given an optional \f(CW$node\fR as argument, returns the length +from that node onwards. For the chain with the three nodes +A, B and C would return 3, 2, and 1 for A, B and C, respectively. +.PP +Returns 0 if the passed node is not part of this chain. +.SS "\fInodes()\fP" +.IX Subsection "nodes()" +.Vb 1 +\& my @nodes = $chain\->nodes(); +.Ve +.PP +Return all the node objects in the chain as list, in order. +.SS "\fIadd_node()\fP" +.IX Subsection "add_node()" +.Vb 1 +\& $chain\->add_node( $node ); +.Ve +.PP +Add \f(CW$node\fR to the end of the chain. +.SS "\fIstart()\fP" +.IX Subsection "start()" +.Vb 1 +\& my $node = $chain\->start(); +.Ve +.PP +Return first node in the chain. +.SS "\fIend()\fP" +.IX Subsection "end()" +.Vb 1 +\& my $node = $chain\->end(); +.Ve +.PP +Return last node in the chain. +.SS "\fIlayout()\fP" +.IX Subsection "layout()" +.Vb 1 +\& my $todo = $chain\->layout(); +.Ve +.PP +Return an action stack as array ref, containing the nec. actions to +layout the chain (nodes, plus interlinks in the chain). +.PP +Will recursively traverse all chains linked to this chain. +.SS "\fImerge()\fP" +.IX Subsection "merge()" +.Vb 2 +\& my $chain\->merge ( $other_chain ); +\& my $chain\->merge ( $other_chain, $where ); +.Ve +.PP +Merge the other chain into ourselves, adding its nodes at our end. +The other chain is emptied and must be deleted by the caller. +.PP +If \f(CW$where\fR is defined and a member of \f(CW$other_chain\fR, absorb only the +nodes from \f(CW$where\fR onwards, instead of all of them. +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& $last_error = $node\->error(); +\& +\& $node\->error($error); # set new messags +\& $node\->error(\*(Aq\*(Aq); # clear error +.Ve +.PP +Returns the last error message, or '' for no error. +.SS "\fIdump()\fP" +.IX Subsection "dump()" +.Vb 1 +\& $chain\->dump(); +.Ve +.PP +Dump the chain to \s-1STDERR\s0, to aid debugging. +.SH "EXPORT" +.IX Header "EXPORT" +None by default. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy, Graph::Easy::Layout. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2006 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Layout::Force.3pm b/lib/perl/man/man3/Graph::Easy::Layout::Force.3pm new file mode 100644 index 0000000000000000000000000000000000000000..086423bb8f94579daa09ee7e68304e888959b8be --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Layout::Force.3pm @@ -0,0 +1,184 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Layout::Force 3" +.TH Graph::Easy::Layout::Force 3 "2011-12-23" "perl v5.12.4" "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::Easy::Layout::Force \- Force\-based layouter for Graph::Easy +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& $graph\->add_edge (\*(AqBonn\*(Aq, \*(AqBerlin\*(Aq); +\& $graph\->add_edge (\*(AqBonn\*(Aq, \*(AqUlm\*(Aq); +\& $graph\->add_edge (\*(AqUlm\*(Aq, \*(AqBerlin\*(Aq); +\& +\& $graph\->layout( type => \*(Aqforce\*(Aq ); +\& +\& print $graph\->as_ascii( ); +\& +\& # prints: +\& +\& # +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +\& # | v +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& # | Bonn | \-\-> | Ulm | \-\-> | Berlin | +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Layout::Force\*(C'\fR contains routines that calculate a +force-based layout for a graph. +.PP +Nodes repell each other, while edges connecting them draw them together. +.PP +The layouter calculates the forces on each node, then moves them around +according to these forces until things have settled down. +.PP +Used automatically by Graph::Easy. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "METHODS" +.IX Header "METHODS" +This module injects the following methods into Graph::Easy: +.SS "\fI_layout_force()\fP" +.IX Subsection "_layout_force()" +Calculates the node position with a force-based method. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Layout::Grid.3pm b/lib/perl/man/man3/Graph::Easy::Layout::Grid.3pm new file mode 100644 index 0000000000000000000000000000000000000000..17fd694422bcf2592835de0fe66495ef442dfa1e --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Layout::Grid.3pm @@ -0,0 +1,189 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Layout::Grid 3" +.TH Graph::Easy::Layout::Grid 3 "2011-12-23" "perl v5.12.4" "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::Easy::Layout::Grid \- Grid management and size calculation +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $bonn = Graph::Easy::Node\->new( +\& name => \*(AqBonn\*(Aq, +\& ); +\& my $berlin = Graph::Easy::Node\->new( +\& name => \*(AqBerlin\*(Aq, +\& ); +\& +\& $graph\->add_edge ($bonn, $berlin); +\& +\& $graph\->layout(); +\& +\& print $graph\->as_ascii( ); +\& +\& # prints: +\& +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& # | Bonn | \-\-> | Berlin | +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Layout::Grid\*(C'\fR contains routines that calculate cell sizes +on the grid, which is necessary for \s-1ASCII\s0, boxart and \s-1SVG\s0 output. +.PP +Used automatically by Graph::Easy. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "METHODS" +.IX Header "METHODS" +This module injects the following methods into Graph::Easy: +.SS "\fI_prepare_layout()\fP" +.IX Subsection "_prepare_layout()" +.Vb 1 +\& my ($rows,$cols,$max_x,$max_y, \e@V) = $graph\->_prepare_layout(); +.Ve +.PP +Returns two hashes (\f(CW$rows\fR and \f(CW$cols\fR), containing the columns and rows +of the layout with their nec. sizes (in chars) plus the maximum +framebuffer size nec. for this layout. Also returns reference of +a list of all cells to be rendered. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2006 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Layout::Path.3pm b/lib/perl/man/man3/Graph::Easy::Layout::Path.3pm new file mode 100644 index 0000000000000000000000000000000000000000..66bd7d32cd67f507a201bc90108b6b2f8ab85321 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Layout::Path.3pm @@ -0,0 +1,240 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Layout::Path 3" +.TH Graph::Easy::Layout::Path 3 "2011-12-23" "perl v5.12.4" "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::Easy::Layout::Path \- Path management for Manhattan\-style grids +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $bonn = Graph::Easy::Node\->new( +\& name => \*(AqBonn\*(Aq, +\& ); +\& my $berlin = Graph::Easy::Node\->new( +\& name => \*(AqBerlin\*(Aq, +\& ); +\& +\& $graph\->add_edge ($bonn, $berlin); +\& +\& $graph\->layout(); +\& +\& print $graph\->as_ascii( ); +\& +\& # prints: +\& +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& # | Bonn | \-\-> | Berlin | +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Layout::Scout\*(C'\fR contains just the actual path-managing code for +Graph::Easy, e.g. to create/destroy/maintain paths, node +placement etc. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "METHODS into Graph::Easy" +.IX Header "METHODS into Graph::Easy" +This module injects the following methods into \f(CW\*(C`Graph::Easy\*(C'\fR: +.SS "\fI_path_is_clear()\fP" +.IX Subsection "_path_is_clear()" +.Vb 1 +\& $graph\->_path_is_clear($path); +.Ve +.PP +For all points (x,y pairs) in the path, check that the cell is still free. +\&\f(CW$path\fR points to a list x,y,type pairs as in \f(CW\*(C`[ [x,y,type], [x,y,type], ...]\*(C'\fR. +.SS "\fI_create_cell()\fP" +.IX Subsection "_create_cell()" +.Vb 1 +\& my $cell = $graph\->($edge,$x,$y,$type); +.Ve +.PP +Create a cell at \f(CW\*(C`$x,$y\*(C'\fR coordinates with type \f(CW$type\fR for the specified +edge. +.SS "\fI_path_is_clear()\fP" +.IX Subsection "_path_is_clear()" +.Vb 1 +\& $graph\->_path_is_clear(); +.Ve +.PP +For all points (x,y pairs) in the path, check that the cell is still free. +\&\f(CW$path\fR points to a list of \f(CW\*(C`[ x,y,type, x,y,type, ...]\*(C'\fR. +.PP +Returns true when the path is clear, false otherwise. +.SS "\fI_trace_path()\fP" +.IX Subsection "_trace_path()" +.Vb 1 +\& my $path = my $graph\->_trace_path($src,$dst,$edge); +.Ve +.PP +Find a free way from source node/group to destination node/group for the +specified edge. Both source and destination need to be placed beforehand. +.SH "METHODS in Graph::Easy::Node" +.IX Header "METHODS in Graph::Easy::Node" +This module injects the following methods into \f(CW\*(C`Graph::Easy::Node\*(C'\fR: +.SS "\fI_near_places()\fP" +.IX Subsection "_near_places()" +.Vb 1 +\& my $node\->_near_places(); +.Ve +.PP +Take a node and return a list of possible placements around it and +prune out already occupied cells. \f(CW$d\fR is the distance from the node +border and defaults to two (for placements). Set it to one for +adjacent cells. +.SS "\fI_shuffle_dir()\fP" +.IX Subsection "_shuffle_dir()" +.Vb 1 +\& my $dirs = $node\->_shuffle_dir( [ 0,1,2,3 ], $dir); +.Ve +.PP +Take a ref to an array with four entries and shuffle them around according to +\&\f(CW$dir\fR. +.SS "\fI_shift()\fP" +.IX Subsection "_shift()" +.Vb 1 +\& my $dir = $node\->_shift($degrees); +.Ve +.PP +Return a the \f(CW\*(C`flow()\*(C'\fR direction shifted by X degrees to \f(CW$dir\fR. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Layout::Repair.3pm b/lib/perl/man/man3/Graph::Easy::Layout::Repair.3pm new file mode 100644 index 0000000000000000000000000000000000000000..60e2762a834e79b67041caa26c3c9ccf7e71a504 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Layout::Repair.3pm @@ -0,0 +1,209 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Layout::Repair 3" +.TH Graph::Easy::Layout::Repair 3 "2011-12-23" "perl v5.12.4" "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::Easy::Layout::Repair \- Repair spliced layout with group cells +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $bonn = Graph::Easy::Node\->new( +\& name => \*(AqBonn\*(Aq, +\& ); +\& my $berlin = Graph::Easy::Node\->new( +\& name => \*(AqBerlin\*(Aq, +\& ); +\& +\& $graph\->add_edge ($bonn, $berlin); +\& +\& $graph\->layout(); +\& +\& print $graph\->as_ascii( ); +\& +\& # prints: +\& +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& # | Bonn | \-\-> | Berlin | +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Layout::Repair\*(C'\fR contains code that can splice in +group cells into a layout, as well as repair the layout after that step. +.PP +It is part of Graph::Easy and used automatically. +.SH "METHODS" +.IX Header "METHODS" +\&\f(CW\*(C`Graph::Easy::Layout\*(C'\fR injects the following methods into the \f(CW\*(C`Graph::Easy\*(C'\fR +namespace: +.SS "\fI_edges_into_groups()\fP" +.IX Subsection "_edges_into_groups()" +Put the edges into the appropriate group and class. +.SS "\fI_assign_ranks()\fP" +.IX Subsection "_assign_ranks()" +.Vb 1 +\& $graph\->_assign_ranks(); +.Ve +.SS "\fI_repair_nodes()\fP" +.IX Subsection "_repair_nodes()" +Splicing the rows/columns to add filler cells will have torn holes into +multi-edges nodes, so we insert additional filler cells to repair this. +.SS "\fI_splice_edges()\fP" +.IX Subsection "_splice_edges()" +Splicing the rows/columns to add filler cells might have torn holes into +multi-celled edges, so we splice these together again. +.SS "\fI_repair_edges()\fP" +.IX Subsection "_repair_edges()" +Splicing the rows/columns to add filler cells might have put \*(L"holes\*(R" +between an edge start/end and the node cell it points to. This +routine fixes this problem by extending the edge by one cell if +necessary. +.SS "\fI_fill_group_cells()\fP" +.IX Subsection "_fill_group_cells()" +After doing a \f(CW\*(C`layout()\*(C'\fR, we need to add the group to each cell based on +what group the nearest node is in. +.PP +This routine will also find the label cell for each group, and repair +edge/node damage done by the splicing. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Layout::Scout.3pm b/lib/perl/man/man3/Graph::Easy::Layout::Scout.3pm new file mode 100644 index 0000000000000000000000000000000000000000..0922942bb151ff3805aeb6edc97ef437642929f6 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Layout::Scout.3pm @@ -0,0 +1,179 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Layout::Scout 3" +.TH Graph::Easy::Layout::Scout 3 "2011-12-23" "perl v5.12.4" "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::Easy::Layout::Scout \- Find paths in a Manhattan\-style grid +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $bonn = Graph::Easy::Node\->new( +\& name => \*(AqBonn\*(Aq, +\& ); +\& my $berlin = Graph::Easy::Node\->new( +\& name => \*(AqBerlin\*(Aq, +\& ); +\& +\& $graph\->add_edge ($bonn, $berlin); +\& +\& $graph\->layout(); +\& +\& print $graph\->as_ascii( ); +\& +\& # prints: +\& +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +\& # | Bonn | \-\-> | Berlin | +\& # +\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-+ +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Layout::Scout\*(C'\fR contains just the actual pathfinding code for +Graph::Easy. It should not be used directly. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "METHODS" +.IX Header "METHODS" +This package inserts a few methods into \f(CW\*(C`Graph::Easy\*(C'\fR and +\&\f(CW\*(C`Graph::Easy::Node\*(C'\fR to enable path-finding for graphs. It should not +be used directly. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Node.3pm b/lib/perl/man/man3/Graph::Easy::Node.3pm new file mode 100644 index 0000000000000000000000000000000000000000..2d3132aad648b937a6556210f996a61dffffb982 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Node.3pm @@ -0,0 +1,844 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Node 3" +.TH Graph::Easy::Node 3 "2011-12-23" "perl v5.12.4" "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::Easy::Node \- Represents a node in a Graph::Easy graph +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy::Node; +\& +\& my $bonn = Graph::Easy::Node\->new(\*(AqBonn\*(Aq); +\& +\& $bonn\->set_attribute(\*(Aqborder\*(Aq, \*(Aqsolid 1px black\*(Aq); +\& +\& my $berlin = Graph::Easy::Node\->new( name => \*(AqBerlin\*(Aq ); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Node\*(C'\fR represents a node in a simple graph. Each +node has contents (a text, an image or another graph), and dimension plus +an origin. The origin is typically determined by a graph layouter module +like Graph::Easy. +.SH "METHODS" +.IX Header "METHODS" +Apart from the methods of the base class Graph::Easy::Base, a +\&\f(CW\*(C`Graph::Easy::Node\*(C'\fR has the following methods: +.SS "\fInew()\fP" +.IX Subsection "new()" +.Vb 2 +\& my $node = Graph::Easy::Node\->new( name => \*(Aqnode name\*(Aq ); +\& my $node = Graph::Easy::Node\->new( \*(Aqnode name\*(Aq ); +.Ve +.PP +Creates a new node. If you want to add the node to a Graph::Easy object, +then please use the following to create the node object: +.PP +.Vb 1 +\& my $node = $graph\->add_node(\*(AqNode name\*(Aq); +.Ve +.PP +You can then use \f(CW\*(C`$node\->set_attribute();\*(C'\fR +or \f(CW\*(C`$node\->set_attributes();\*(C'\fR to set the new Node's attributes. +.SS "\fIas_ascii()\fP" +.IX Subsection "as_ascii()" +.Vb 1 +\& my $ascii = $node\->as_ascii(); +.Ve +.PP +Return the node as a little box drawn in \s-1ASCII\s0 art as a string. +.SS "\fIas_txt()\fP" +.IX Subsection "as_txt()" +.Vb 1 +\& my $txt = $node\->as_txt(); +.Ve +.PP +Return the node in simple txt format, including attributes. +.SS "\fIas_svg()\fP" +.IX Subsection "as_svg()" +.Vb 1 +\& my $svg = $node\->as_svg(); +.Ve +.PP +Returns the node as Scalable Vector Graphic. The actual code for +that routine is defined Graph::Easy::As_svg.pm. +.SS "\fIas_graphviz()\fP" +.IX Subsection "as_graphviz()" +\&\fBFor internal use\fR mostly \- use at your own risk. +.PP +.Vb 1 +\& my $txt = $node\->as_graphviz(); +.Ve +.PP +Returns the node as graphviz compatible text which can be fed +to dot etc to create images. +.PP +One needs to load Graph::Easy::As_graphviz first before this method +can be called. +.SS "\fIas_graphviz_txt()\fP" +.IX Subsection "as_graphviz_txt()" +\&\fBFor internal use\fR mostly \- use at your own risk. +.PP +.Vb 1 +\& my $txt = $node\->as_graphviz_txt(); +.Ve +.PP +Return only the node itself (without attributes) as a graphviz representation. +.PP +One needs to load Graph::Easy::As_graphviz first before this method +can be called. +.SS "\fIas_pure_txt()\fP" +.IX Subsection "as_pure_txt()" +.Vb 1 +\& my $txt = $node\->as_pure_txt(); +.Ve +.PP +Return the node in simple txt format, without the attributes. +.SS "\fItext_styles_as_css()\fP" +.IX Subsection "text_styles_as_css()" +.Vb 1 +\& my $styles = $graph\->text_styles_as_css(); # or $edge\->...() etc. +.Ve +.PP +Return the text styles as a chunk of \s-1CSS\s0 styling that can be embedded into +a \f(CW\*(C` style="" \*(C'\fR parameter. +.SS "\fIas_html()\fP" +.IX Subsection "as_html()" +.Vb 1 +\& my $html = $node\->as_html(); +.Ve +.PP +Return the node as \s-1HTML\s0 code. +.SS "\fIattribute()\fP, \fIget_attribute()\fP" +.IX Subsection "attribute(), get_attribute()" +.Vb 1 +\& $node\->attribute(\*(Aqborder\-style\*(Aq); +.Ve +.PP +Returns the respective attribute of the node or undef if it +was not set. If there is a default attribute for all nodes +of the specific class the node is in, then this will be returned. +.SS "\fIget_attributes()\fP" +.IX Subsection "get_attributes()" +.Vb 1 +\& my $att = $object\->get_attributes(); +.Ve +.PP +Return all effective attributes on this object (graph/node/group/edge) as +an anonymous hash ref. This respects inheritance and default values. +.PP +Note that this does not include custom attributes. +.PP +See also get_custom_attributes and \fIraw_attributes()\fR. +.SS "\fIget_custom_attributes()\fP" +.IX Subsection "get_custom_attributes()" +.Vb 1 +\& my $att = $object\->get_custom_attributes(); +.Ve +.PP +Return all the custom attributes on this object (graph/node/group/edge) as +an anonymous hash ref. +.SS "\fIcustom_attributes()\fP" +.IX Subsection "custom_attributes()" +.Vb 1 +\& my $att = $object\->custom_attributes(); +.Ve +.PP +\&\f(CW\*(C`custom_attributes()\*(C'\fR is an alias for get_custom_attributes. +.SS "\fIraw_attributes()\fP" +.IX Subsection "raw_attributes()" +.Vb 1 +\& my $att = $object\->get_attributes(); +.Ve +.PP +Return all set attributes on this object (graph/node/group/edge) as +an anonymous hash ref. This respects inheritance, but does not include +default values for unset attributes. +.PP +See also \fIget_attributes()\fR. +.SS "\fIdefault_attribute()\fP" +.IX Subsection "default_attribute()" +.Vb 1 +\& my $def = $graph\->default_attribute($class, \*(Aqfill\*(Aq); +.Ve +.PP +Returns the default value for the given attribute \fBin the class\fR +of the object. +.PP +The default attribute is the value that will be used if +the attribute on the object itself, as well as the attribute +on the class is unset. +.PP +To find out what attribute is on the class, use the three-arg form +of attribute on the graph: +.PP +.Vb 2 +\& my $g = Graph::Easy\->new(); +\& my $node = $g\->add_node(\*(AqBerlin\*(Aq); +\& +\& print $node\->attribute(\*(Aqfill\*(Aq), "\en"; # print "white" +\& print $node\->default_attribute(\*(Aqfill\*(Aq), "\en"; # print "white" +\& print $g\->attribute(\*(Aqnode\*(Aq,\*(Aqfill\*(Aq), "\en"; # print "white" +\& +\& $g\->set_attribute(\*(Aqnode\*(Aq,\*(Aqfill\*(Aq,\*(Aqred\*(Aq); # class is "red" +\& $node\->set_attribute(\*(Aqfill\*(Aq,\*(Aqgreen\*(Aq); # this object is "green" +\& +\& print $node\->attribute(\*(Aqfill\*(Aq), "\en"; # print "green" +\& print $node\->default_attribute(\*(Aqfill\*(Aq), "\en"; # print "white" +\& print $g\->attribute(\*(Aqnode\*(Aq,\*(Aqfill\*(Aq), "\en"; # print "red" +.Ve +.PP +See also \fIraw_attribute()\fR. +.SS "attributes_as_txt" +.IX Subsection "attributes_as_txt" +.Vb 1 +\& my $txt = $node\->attributes_as_txt(); +.Ve +.PP +Return the attributes of this node as text description. This is used +by the \f(CW\*(C`$graph\->as_txt()\*(C'\fR code and there should be no reason +to use this function on your own. +.SS "\fIset_attribute()\fP" +.IX Subsection "set_attribute()" +.Vb 1 +\& $node\->set_attribute(\*(Aqborder\-style\*(Aq, \*(Aqnone\*(Aq); +.Ve +.PP +Sets the specified attribute of this (and only this!) node to the +specified value. +.SS "\fIdel_attribute()\fP" +.IX Subsection "del_attribute()" +.Vb 1 +\& $node\->del_attribute(\*(Aqborder\-style\*(Aq); +.Ve +.PP +Deletes the specified attribute of this (and only this!) node. +.SS "\fIset_attributes()\fP" +.IX Subsection "set_attributes()" +.Vb 1 +\& $node\->set_attributes( $hash ); +.Ve +.PP +Sets all attributes specified in \f(CW$hash\fR as key => value pairs in this +(and only this!) node. +.SS "\fIborder_attribute()\fP" +.IX Subsection "border_attribute()" +.Vb 1 +\& my $border = $node\->border_attribute(); +.Ve +.PP +Assembles the \f(CW\*(C`border\-width\*(C'\fR, \f(CW\*(C`border\-color\*(C'\fR and \f(CW\*(C`border\-style\*(C'\fR attributes +into a string like \*(L"solid 1px red\*(R". +.SS "\fIcolor_attribute()\fP" +.IX Subsection "color_attribute()" +.Vb 2 +\& # returns f.i. #ff0000 +\& my $color = $node\->get_color_attribute( \*(Aqfill\*(Aq ); +.Ve +.PP +Just like \fIget_attribute()\fR, but only for colors, and returns them as hex, +using the current colorscheme. +.SS "\fIget_color_attribute()\fP" +.IX Subsection "get_color_attribute()" +Is an alias for \fIcolor_attribute()\fR. +.SS "\fIraw_attribute()\fP, \fIget_raw_attribute()\fP" +.IX Subsection "raw_attribute(), get_raw_attribute()" +.Vb 1 +\& my $value = $object\->raw_attribute( $name ); +.Ve +.PP +Return the value of attribute \f(CW$name\fR from the object it this +method is called on (graph, node, edge, group etc.). If the +attribute is not set on the object itself, returns undef. +.PP +This method respects inheritance, so an attribute value of 'inherit' +on an object will make the method return the inherited value: +.PP +.Vb 2 +\& my $g = Graph::Easy\->new(); +\& my $n = $g\->add_node(\*(AqA\*(Aq); +\& +\& $g\->set_attribute(\*(Aqcolor\*(Aq,\*(Aqred\*(Aq); +\& +\& print $n\->raw_attribute(\*(Aqcolor\*(Aq); # undef +\& $n\->set_attribute(\*(Aqcolor\*(Aq,\*(Aqinherit\*(Aq); +\& print $n\->raw_attribute(\*(Aqcolor\*(Aq); # \*(Aqred\*(Aq +.Ve +.PP +See also \fIattribute()\fR. +.SS "\fIraw_color_attribute()\fP" +.IX Subsection "raw_color_attribute()" +.Vb 2 +\& # returns f.i. #ff0000 +\& my $color = $graph\->raw_color_attribute(\*(Aqcolor\*(Aq ); +.Ve +.PP +Just like \fIraw_attribute()\fR, but only for colors, and returns them as hex, +using the current colorscheme. +.PP +If the attribute is not set on the object, returns \f(CW\*(C`undef\*(C'\fR. +.SS "\fItext_styles()\fP" +.IX Subsection "text_styles()" +.Vb 5 +\& my $styles = $node\->text_styles(); +\& if ($styles\->{\*(Aqitalic\*(Aq}) +\& { +\& print \*(Aqis italic\en\*(Aq; +\& } +.Ve +.PP +Return a hash with the given text-style properties, aka 'underline', 'bold' etc. +.SS "\fIfind_grandparent()\fP" +.IX Subsection "find_grandparent()" +.Vb 1 +\& my $grandpa = $node\->find_grandparent(); +.Ve +.PP +For a node that has no origin (is not relative to another), returns +\&\f(CW$node\fR. For all others, follows the chain of origin back until +a node without a parent is found and returns this node. +This code assumes there are no loops, which \f(CW\*(C`origin()\*(C'\fR prevents from +happening. +.SS "\fIname()\fP" +.IX Subsection "name()" +.Vb 1 +\& my $name = $node\->name(); +.Ve +.PP +Return the name of the node. In a graph, each node has a unique name, +which, unless a node label is set, will be displayed when rendering the +graph. +.SS "\fIlabel()\fP" +.IX Subsection "label()" +.Vb 2 +\& my $label = $node\->label(); +\& my $label = $node\->label(1); # raw +.Ve +.PP +Return the label of the node. If no label was set, returns the \f(CW\*(C`name\*(C'\fR +of the node. +.PP +If the optional parameter is true, then the label will returned 'raw', +that is any potential escape of the form \f(CW\*(C`\eN\*(C'\fR, \f(CW\*(C`\eE\*(C'\fR, \f(CW\*(C`\eG\*(C'\fR, \f(CW\*(C`\eT\*(C'\fR +or \f(CW\*(C`\eH\*(C'\fR will not be left alone and not be replaced. +.SS "\fIbackground()\fP" +.IX Subsection "background()" +.Vb 1 +\& my $bg = $node\->background(); +.Ve +.PP +Returns the background color. This method honours group membership and +inheritance. +.SS "\fIquoted_comment()\fP" +.IX Subsection "quoted_comment()" +.Vb 1 +\& my $cmt = $node\->comment(); +.Ve +.PP +Comment of this object, quoted suitable as to be embedded into \s-1HTML/SVG\s0. +Returns the empty string if this object doesn't have a comment set. +.SS "\fItitle()\fP" +.IX Subsection "title()" +.Vb 2 +\& my $title = $node\->title(); +\& my $title = $node\->title(1); # raw +.Ve +.PP +Returns a potential title that can be used for mouse-over effects. +If no title was set (or autogenerated), will return an empty string. +.PP +If the optional parameter is true, then the title will returned 'raw', +that is any potential escape of the form \f(CW\*(C`\eN\*(C'\fR, \f(CW\*(C`\eE\*(C'\fR, \f(CW\*(C`\eG\*(C'\fR, \f(CW\*(C`\eT\*(C'\fR +or \f(CW\*(C`\eH\*(C'\fR will be left alone and not be replaced. +.SS "\fIlink()\fP" +.IX Subsection "link()" +.Vb 2 +\& my $link = $node\->link(); +\& my $link = $node\->link(1); # raw +.Ve +.PP +Returns the \s-1URL\s0, build from the \f(CW\*(C`linkbase\*(C'\fR and \f(CW\*(C`link\*(C'\fR (or \f(CW\*(C`autolink\*(C'\fR) +attributes. If the node has no link associated with it, return an empty +string. +.PP +If the optional parameter is true, then the link will returned 'raw', +that is any potential escape of the form \f(CW\*(C`\eN\*(C'\fR, \f(CW\*(C`\eE\*(C'\fR, \f(CW\*(C`\eG\*(C'\fR, \f(CW\*(C`\eT\*(C'\fR +or \f(CW\*(C`\eH\*(C'\fR will not be left alone and not be replaced. +.SS "\fIdimensions()\fP" +.IX Subsection "dimensions()" +.Vb 1 +\& my ($w,$h) = $node\->dimensions(); +.Ve +.PP +Returns the dimensions of the node/cell derived from the label (or name) in characters. +Assumes the label/name has literal '\en' replaced by \*(L"\en\*(R". +.SS "\fIsize()\fP" +.IX Subsection "size()" +.Vb 1 +\& my ($cx,$cy) = $node\->size(); +.Ve +.PP +Returns the node size in cells. +.SS "\fIcontents()\fP" +.IX Subsection "contents()" +.Vb 1 +\& my $contents = $node\->contents(); +.Ve +.PP +For nested nodes, returns the contents of the node. +.SS "\fIwidth()\fP" +.IX Subsection "width()" +.Vb 1 +\& my $width = $node\->width(); +.Ve +.PP +Returns the width of the node. This is a unitless number. +.SS "\fIheight()\fP" +.IX Subsection "height()" +.Vb 1 +\& my $height = $node\->height(); +.Ve +.PP +Returns the height of the node. This is a unitless number. +.SS "\fIcolumns()\fP" +.IX Subsection "columns()" +.Vb 1 +\& my $cols = $node\->columns(); +.Ve +.PP +Returns the number of columns (in cells) that this node occupies. +.SS "\fIrows()\fP" +.IX Subsection "rows()" +.Vb 1 +\& my $cols = $node\->rows(); +.Ve +.PP +Returns the number of rows (in cells) that this node occupies. +.SS "\fIis_multicelled()\fP" +.IX Subsection "is_multicelled()" +.Vb 4 +\& if ($node\->is_multicelled()) +\& { +\& ... +\& } +.Ve +.PP +Returns true if the node consists of more than one cell. See als +\&\fIrows()\fR and \fIcols()\fR. +.SS "\fIis_anon()\fP" +.IX Subsection "is_anon()" +.Vb 4 +\& if ($node\->is_anon()) +\& { +\& ... +\& } +.Ve +.PP +Returns true if the node is an anonymous node. False for \f(CW\*(C`Graph::Easy::Node\*(C'\fR +objects, and true for \f(CW\*(C`Graph::Easy::Node::Anon\*(C'\fR. +.SS "\fIpos()\fP" +.IX Subsection "pos()" +.Vb 1 +\& my ($x,$y) = $node\->pos(); +.Ve +.PP +Returns the position of the node. Initially, this is undef, and will be +set from \fIGraph::Easy::layout()\fR. Only valid during the layout phase. +.SS "\fIoffset()\fP" +.IX Subsection "offset()" +.Vb 1 +\& my ($dx,$dy) = $node\->offset(); +.Ve +.PP +Returns the position of the node relativ to the origin. Returns \f(CW\*(C`(0,0)\*(C'\fR if +the origin node was not sset. +.SS "x()" +.IX Subsection "x()" +.Vb 1 +\& my $x = $node\->x(); +.Ve +.PP +Returns the X position of the node. Initially, this is undef, and will be +set from \fIGraph::Easy::layout()\fR. Only valid during the layout phase. +.SS "y()" +.IX Subsection "y()" +.Vb 1 +\& my $y = $node\->y(); +.Ve +.PP +Returns the Y position of the node. Initially, this is undef, and will be +set from \fIGraph::Easy::layout()\fR. Only valid during the layout phase. +.SS "\fIid()\fP" +.IX Subsection "id()" +.Vb 1 +\& my $id = $node\->id(); +.Ve +.PP +Returns the node's unique, internal \s-1ID\s0 number. +.SS "\fIconnections()\fP" +.IX Subsection "connections()" +.Vb 1 +\& my $cnt = $node\->connections(); +.Ve +.PP +Returns the count of incoming and outgoing connections of this node. +Self-loops count as two connections, so in the following example, node \f(CW\*(C`N\*(C'\fR +has \fBfour\fR connections, but only \fBthree\fR edges: +.PP +.Vb 5 +\& +\-\-+ +\& v | +\& +\-\-\-+ +\-\-\-\-\-\-+ +\-\-\-+ +\& | 1 | \-\-> | N | \-\-> | 2 | +\& +\-\-\-+ +\-\-\-\-\-\-+ +\-\-\-+ +.Ve +.PP +See also \fIedges()\fR. +.SS "\fIedges()\fP" +.IX Subsection "edges()" +.Vb 1 +\& my $edges = $node\->edges(); +.Ve +.PP +Returns a list of all the edges (as Graph::Easy::Edge objects) at this node, +in no particular order. +.SS "\fIpredecessors()\fP" +.IX Subsection "predecessors()" +.Vb 1 +\& my @pre = $node\->predecessors(); +.Ve +.PP +Returns all nodes (as objects) that link to us. +.SS "\fIhas_predecessors()\fP" +.IX Subsection "has_predecessors()" +.Vb 4 +\& if ($node\->has_predecessors()) +\& { +\& ... +\& } +.Ve +.PP +Returns true if the node has one or more predecessors. Will return true for +nodes with selfloops. +.SS "\fIsuccessors()\fP" +.IX Subsection "successors()" +.Vb 1 +\& my @suc = $node\->successors(); +.Ve +.PP +Returns all nodes (as objects) that we are linking to. +.SS "\fIsorted_successors()\fP" +.IX Subsection "sorted_successors()" +.Vb 1 +\& my @suc = $node\->sorted_successors(); +.Ve +.PP +Return successors of the node sorted by their chain value +(e.g. successors with more successors first). +.SS "\fIhas_as_successor()\fP" +.IX Subsection "has_as_successor()" +.Vb 4 +\& if ($node\->has_as_successor($other)) +\& { +\& ... +\& } +.Ve +.PP +Returns true if \f(CW$other\fR ( a node or group) is a successor of node, that is if +there is an edge leading from node to \f(CW$other\fR. +.SS "\fIhas_as_predecessor()\fP" +.IX Subsection "has_as_predecessor()" +.Vb 4 +\& if ($node\->has_as_predecessor($other)) +\& { +\& ... +\& } +.Ve +.PP +Returns true if the node has \f(CW$other\fR (a group or node) as predecessor, that +is if there is an edge leading from \f(CW$other\fR to node. +.SS "\fIedges_to()\fP" +.IX Subsection "edges_to()" +.Vb 1 +\& my @edges = $node\->edges_to($other_node); +.Ve +.PP +Returns all the edges (as objects) that start at \f(CW$node\fR and go to +\&\f(CW$other_node\fR. +.SS "\fIshared_edges()\fP" +.IX Subsection "shared_edges()" +.Vb 1 +\& my @edges = $node\->shared_edges(); +.Ve +.PP +Return a list of all edges starting/ending at this node, that share a port +with another edge. +.SS "\fInodes_sharing_start()\fP" +.IX Subsection "nodes_sharing_start()" +.Vb 1 +\& my @nodes = $node\->nodes_sharing_start($side, $port); +.Ve +.PP +Return a list of unique nodes that share a start point with an edge +from this node, on the specified side (absolute) and port number. +.SS "\fInodes_sharing_end()\fP" +.IX Subsection "nodes_sharing_end()" +.Vb 1 +\& my @nodes = $node\->nodes_sharing_end($side, $port); +.Ve +.PP +Return a list of unique nodes that share an end point with an edge +from this node, on the specified side (absolute) and port number. +.SS "\fIedges_at_port()\fP" +.IX Subsection "edges_at_port()" +.Vb 1 +\& my @edges = $node\->edges_to(\*(Aqstart\*(Aq, \*(Aqsouth\*(Aq, \*(Aq0\*(Aq); +.Ve +.PP +Returns all the edge objects that share the same \f(CW\*(C`start\*(C'\fR or \f(CW\*(C`end\*(C'\fR +port at the specified side and port number. The side must be +one of \f(CW\*(C`south\*(C'\fR, \f(CW\*(C`north\*(C'\fR, \f(CW\*(C`west\*(C'\fR or \f(CW\*(C`east\*(C'\fR. The port number +must be positive. +.SS "\fIincoming()\fP" +.IX Subsection "incoming()" +.Vb 1 +\& my @edges = $node\->incoming(); +.Ve +.PP +Return all edges that end at this node. +.SS "\fIoutgoing()\fP" +.IX Subsection "outgoing()" +.Vb 1 +\& my @edges = $node\->outgoing(); +.Ve +.PP +Return all edges that start at this node. +.SS "\fIadd_to_group()\fP" +.IX Subsection "add_to_group()" +.Vb 1 +\& $node\->add_to_group( $group ); +.Ve +.PP +Put the node into this group. +.SS "\fIgroup()\fP" +.IX Subsection "group()" +.Vb 1 +\& my $group = $node\->group(); +.Ve +.PP +Return the group this node belongs to, or undef. +.SS "\fIparent()\fP" +.IX Subsection "parent()" +.Vb 1 +\& my $parent = $node\->parent(); +.Ve +.PP +Returns the parent object of the node, which is either the group the node belongs +to, or the graph. +.SS "\fIorigin()\fP" +.IX Subsection "origin()" +.Vb 1 +\& my $origin_node = $node\->origin(); +.Ve +.PP +Returns the node this node is relativ to, or undef otherwise. +.SS "\fIrelative_to()\fP" +.IX Subsection "relative_to()" +.Vb 1 +\& $node\->relative_to($parent, $dx, $dy); +.Ve +.PP +Sets itself relativ to \f(CW$parent\fR with the offset \f(CW\*(C`$dx,$dy\*(C'\fR. +.SS "\fIshape()\fP" +.IX Subsection "shape()" +.Vb 1 +\& my $shape = $node\->shape(); +.Ve +.PP +Returns the shape of the node as string, defaulting to 'rect'. +.SS "\fIangle()\fP" +.IX Subsection "angle()" +.Vb 1 +\& my $angle = $self\->rotation(); +.Ve +.PP +Return the node's rotation, based on the \f(CW\*(C`rotate\*(C'\fR attribute, and +in case this is relative, on the node's flow. +.SS "\fIflow()\fP" +.IX Subsection "flow()" +.Vb 1 +\& my $flow = $node\->flow(); +.Ve +.PP +Returns the outgoing flow for this node as absolute direction in degrees. +.PP +The value is computed from the incoming flow (or the general flow as +default) and the flow attribute of this node. +.SS "\fI_extra_params()\fP" +.IX Subsection "_extra_params()" +.Vb 1 +\& my $extra_params = $node\->_extra_params(); +.Ve +.PP +The return value of that method is added as extra params to the +\&\s-1HTML\s0 tag for a node when \fIas_html()\fR is called. Returns the empty +string by default, and can be overridden in subclasses. See also +\&\fIuse_class()\fR. +.PP +Overridden method should return a text with a leading space, or the +empty string. +.PP +Example: +.PP +.Vb 2 +\& package Graph::Easy::MyNode; +\& use base qw/Graph::Easy::Node/; +\& +\& sub _extra_params +\& { +\& my $self = shift; +\& +\& \*(Aq \*(Aq . \*(Aqonmouseover="alert(\e\*(Aq\*(Aq . $self\->name() . \*(Aq\e\*(Aq);"\*(Aq; +\& } +\& +\& 1; +.Ve +.SH "EXPORT" +.IX Header "EXPORT" +None by default. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Node::Anon.3pm b/lib/perl/man/man3/Graph::Easy::Node::Anon.3pm new file mode 100644 index 0000000000000000000000000000000000000000..1fa09da3135562137e6815a1a8ffef2543ea362e --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Node::Anon.3pm @@ -0,0 +1,161 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Node::Anon 3" +.TH Graph::Easy::Node::Anon 3 "2011-12-23" "perl v5.12.4" "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::Easy::Node::Anon \- An anonymous, invisible node in Graph::Easy +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& use Graph::Easy::Node::Anon; +\& +\& my $anon = Graph::Easy::Node::Anon\->new(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Node::Anon\*(C'\fR represents an anonymous, invisible node. +These can be used to let edges start and end \*(L"nowhere\*(R". +.PP +The syntax in the Graph::Easy textual description language looks like this: +.PP +.Vb 1 +\& [ ] \-> [ Bonn ] \-> [ ] +.Ve +.SH "EXPORT" +.IX Header "EXPORT" +None by default. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy::Node. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2006 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Node::Cell.3pm b/lib/perl/man/man3/Graph::Easy::Node::Cell.3pm new file mode 100644 index 0000000000000000000000000000000000000000..82303508b532412d4b2ade3491958e7bd9a3a294 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Node::Cell.3pm @@ -0,0 +1,184 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Node::Cell 3" +.TH Graph::Easy::Node::Cell 3 "2011-12-23" "perl v5.12.4" "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::Easy::Node::Cell \- An empty filler cell +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 2 +\& use Graph::Easy; +\& use Graph::Easy::Edge; +\& +\& my $graph = Graph::Easy\->new(); +\& +\& my $node = $graph\->add_node(\*(AqA\*(Aq); +\& +\& my $path = Graph::Easy::Node::Cell\->new( +\& graph => $graph, node => $node, +\& ); +\& +\& ... +\& +\& print $graph\->as_ascii(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Node::Cell\*(C'\fR is used to reserve a cell in the grid for nodes +that occupy more than one cell. +.PP +You should not need to use this class directly. +.SH "METHODS" +.IX Header "METHODS" +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& $last_error = $cell\->error(); +\& +\& $cvt\->error($error); # set new messags +\& $cvt\->error(\*(Aq\*(Aq); # clear error +.Ve +.PP +Returns the last error message, or '' for no error. +.SS "\fInode()\fP" +.IX Subsection "node()" +.Vb 1 +\& my $node = $cell\->node(); +.Ve +.PP +Returns the node this filler cell belongs to. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2005 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Node::Empty.3pm b/lib/perl/man/man3/Graph::Easy::Node::Empty.3pm new file mode 100644 index 0000000000000000000000000000000000000000..b3d2f0decacebb2937e9c7ee1badd03a300d0c18 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Node::Empty.3pm @@ -0,0 +1,153 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Node::Empty 3" +.TH Graph::Easy::Node::Empty 3 "2011-12-23" "perl v5.12.4" "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::Easy::Node::Empty \- An empty, borderless cell in a node cluster +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& my $cell = Graph::Easy::Node::Empty\->new(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +A \f(CW\*(C`Graph::Easy::Node::Empty\*(C'\fR represents a borderless, empty cell in +a node cluster. It is mainly used to have an object to render collapsed +borders in \s-1ASCII\s0 output. +.PP +You should not need to use this class directly. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy::Node. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com>. +.PP +See the \s-1LICENSE\s0 file for more details. diff --git a/lib/perl/man/man3/Graph::Easy::Parser.3pm b/lib/perl/man/man3/Graph::Easy::Parser.3pm new file mode 100644 index 0000000000000000000000000000000000000000..5ffaaf3badc8f01330dc0efb52d8cc606764714a --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Parser.3pm @@ -0,0 +1,571 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Parser 3" +.TH Graph::Easy::Parser 3 "2011-12-23" "perl v5.12.4" "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::Easy::Parser \- Parse Graph::Easy from textual description +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 3 +\& # creating a graph from a textual description +\& use Graph::Easy::Parser; +\& my $parser = Graph::Easy::Parser\->new(); +\& +\& my $graph = $parser\->from_text( +\& \*(Aq[ Bonn ] => [ Berlin ]\*(Aq. +\& \*(Aq[ Berlin ] => [ Rostock ]\*(Aq. +\& ); +\& print $graph\->as_ascii(); +\& +\& print $parser\->from_file(\*(Aqmygraph.txt\*(Aq)\->as_ascii(); +\& +\& # Also works automatically on graphviz code: +\& print Graph::Easy::Parser\->from_file(\*(Aqmygraph.dot\*(Aq)\->as_ascii(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Parser\*(C'\fR lets you parse simple textual descriptions +of graphs, and constructs a \f(CW\*(C`Graph::Easy\*(C'\fR object from them. +.PP +The resulting object can than be used to layout and output the graph. +.SS "Input" +.IX Subsection "Input" +The input consists of text describing the graph, encoded in \s-1UTF\-8\s0. +.PP +Example: +.PP +.Vb 4 +\& [ Bonn ] \-\-> [ Berlin ] +\& [ Frankfurt ] <=> [ Dresden ] +\& [ Bonn ] \-\-> [ Frankfurt ] +\& [ Bonn ] = > [ Frankfurt ] +.Ve +.PP +\fIGraphviz\fR +.IX Subsection "Graphviz" +.PP +In addition there is a bit of magic that detects graphviz code, so +input of the following form will also work: +.PP +.Vb 3 +\& digraph Graph1 { +\& "Bonn" \-> "Berlin" +\& } +.Ve +.PP +Note that the magic detection only works for \fBnamed\fR graphs or graph +with \*(L"digraph\*(R" at their start, so the following will not be detected as +graphviz code because it looks exactly like valid Graph::Easy code +at the start: +.PP +.Vb 3 +\& graph { +\& "Bonn" \-> "Berlin" +\& } +.Ve +.PP +See Graph::Easy::Parser::Graphviz for more information about parsing +graphs in the \s-1DOT\s0 language. +.PP +\fI\s-1VCG\s0\fR +.IX Subsection "VCG" +.PP +In addition there is a bit of magic that detects \s-1VCG\s0 code, so +input of the following form will also work: +.PP +.Vb 5 +\& graph: { +\& node: { title: Bonn; } +\& node: { title: Berlin; } +\& edge: { sourcename: Bonn; targetname: Berlin; } +\& } +.Ve +.PP +See Graph::Easy::Parser::VCG for more information about parsing +graphs in the \s-1VCG\s0 language. +.SS "Input Syntax" +.IX Subsection "Input Syntax" +This is a \fBvery\fR brief description of the syntax for the Graph::Easy +language, for a full specification, please see Graph::Easy::Manual. +.IP "nodes" 2 +.IX Item "nodes" +Nodes are rendered (or \*(L"quoted\*(R", if you wish) with enclosing square brackets: +.Sp +.Vb 2 +\& [ Single node ] +\& [ Node A ] \-\-> [ Node B ] +.Ve +.Sp +Anonymous nodes do not have a name and cannot be refered to again: +.Sp +.Vb 1 +\& [ ] \-> [ Bonn ] \-> [ ] +.Ve +.Sp +This creates three nodes, two of them anonymous. +.IP "edges" 2 +.IX Item "edges" +The edges between the nodes can have the following styles: +.Sp +.Vb 4 +\& \-> solid +\& => double +\& .> dotted +\& ~> wave +\& +\& \- > dashed +\& .\-> dot\-dash +\& ..\-> dot\-dot\-dash +\& = > double\-dash +.Ve +.Sp +There are also the styles \f(CW\*(C`bold\*(C'\fR, \f(CW\*(C`wide\*(C'\fR and \f(CW\*(C`broad\*(C'\fR. Unlike the others, +these can only be set via the (optional) edge attributes: +.Sp +.Vb 1 +\& [ AB ] \-\-> { style: bold; } [ ABC ] +.Ve +.Sp +You can repeat each of the style-patterns as much as you like: +.Sp +.Vb 5 +\& \-\-\-> +\& ==> +\& => +\& ~~~~~> +\& ..\-..\-..\-> +.Ve +.Sp +Note that in patterns longer than one character, the entire +pattern must be repeated e.g. all characters of the pattern must be +present. Thus: +.Sp +.Vb 2 +\& ..\-..\-..\-> # valid dot\-dot\-dash +\& ..\-..\-..> # invalid! +\& +\& .\-.\-.\-> # valid dot\-dash +\& .\-.\-> # invalid! +.Ve +.Sp +In additon to the styles, the following two directions are possible: +.Sp +.Vb 4 +\& \-\- edge without arrow heads +\& \-\-> arrow at target node (end point) +\& <\-\-> arrow on both the source and target node +\& (end and start point) +.Ve +.Sp +Of course you can combine all directions with all styles. However, +note that edges without arrows cannot use the shortcuts for styles: +.Sp +.Vb 5 +\& \-\-\- # valid +\& .\-.\- # valid +\& .\- # invalid! +\& \- # invalid! +\& ~ # invalid! +.Ve +.Sp +Just remember to use at least two repititions of the full pattern +for arrow-less edges. +.Sp +You can also give edges a label, either by inlining it into the style, +or by setting it via the attributes: +.Sp +.Vb 1 +\& [ AB ] \-\-> { style: bold; label: foo; } [ ABC ] +\& +\& \-\- foo \-\-> +\& ... baz ...> +\& +\& \-\- solid \-\-> +\& == double ==> +\& .. dotted ..> +\& ~~ wave ~~> +\& +\& \- dashed \- > +\& = double\-dash = > +\& .\- dot\-dash .\-> +\& ..\- dot\-dot\-dash ..\-> +.Ve +.Sp +Note that the two patterns on the left and right of the label must be +the same, and that there is a space between the left pattern and the +label, as well as the label and the right pattern. +.Sp +You may use inline label only with edges that have an arrow. Thus: +.Sp +.Vb 2 +\& <\-\- label \-\-> # valid +\& \-\- label \-\-> # valid +\& +\& \-\- label \-\- # invalid! +.Ve +.Sp +To use a label with an edge without arrow heads, use the attributes: +.Sp +.Vb 1 +\& [ AB ] \-\- { label: edgelabel; } [ CD ] +.Ve +.IP "groups" 2 +.IX Item "groups" +Round brackets are used to group nodes together: +.Sp +.Vb 1 +\& ( Cities: +\& +\& [ Bonn ] \-> [ Berlin ] +\& ) +.Ve +.Sp +Anonymous groups do not have a name and cannot be refered to again: +.Sp +.Vb 1 +\& ( [ Bonn ] ) \-> [ Berlin ] +.Ve +.Sp +This creates an anonymous group with the node \f(CW\*(C`Bonn\*(C'\fR in it, and +links it to the node \f(CW\*(C`Berlin\*(C'\fR. +.PP +Please see Graph::Easy::Manual for a full description of the syntax rules. +.SS "Output" +.IX Subsection "Output" +The output will be a Graph::Easy object (unless overrriden +with \f(CW\*(C`use_class()\*(C'\fR), see the documentation for Graph::Easy what you can do +with it. +.SH "EXAMPLES" +.IX Header "EXAMPLES" +See Graph::Easy for an extensive list of examples. +.SH "METHODS" +.IX Header "METHODS" +\&\f(CW\*(C`Graph::Easy::Parser\*(C'\fR supports the following methods: +.SS "\fInew()\fP" +.IX Subsection "new()" +.Vb 2 +\& use Graph::Easy::Parser; +\& my $parser = Graph::Easy::Parser\->new(); +.Ve +.PP +Creates a new parser object. The valid parameters are: +.PP +.Vb 2 +\& debug +\& fatal_errors +.Ve +.PP +The first will enable debug output to \s-1STDERR:\s0 +.PP +.Vb 2 +\& my $parser = Graph::Easy::Parser\->new( debug => 1 ); +\& $parser\->from_text(\*(Aq[A] \-> [ B ]\*(Aq); +.Ve +.PP +Setting \f(CW\*(C`fatal_errors\*(C'\fR to 0 will make parsing errors not die, but +just set an error string, which can be retrieved with \fIerror()\fR. +.PP +.Vb 3 +\& my $parser = Graph::Easy::Parser\->new( fatal_errors => 0 ); +\& $parser\->from_text(\*(Aq foo \*(Aq ); +\& print $parser\->error(); +.Ve +.PP +See also \fIcatch_messages()\fR for how to catch errors and warnings. +.SS "\fIreset()\fP" +.IX Subsection "reset()" +.Vb 1 +\& $parser\->reset(); +.Ve +.PP +Reset the status of the parser, clear errors etc. Automatically called +when you call any of the \f(CW\*(C`from_XXX()\*(C'\fR methods below. +.SS "\fIuse_class()\fP" +.IX Subsection "use_class()" +.Vb 1 +\& $parser\->use_class(\*(Aqnode\*(Aq, \*(AqGraph::Easy::MyNode\*(Aq); +.Ve +.PP +Override the class to be used to constructs objects while parsing. The +first parameter can be one of the following: +.PP +.Vb 4 +\& node +\& edge +\& graph +\& group +.Ve +.PP +The second parameter should be a class that is a subclass of the +appropriate base class: +.PP +.Vb 1 +\& package Graph::Easy::MyNode; +\& +\& use base qw/Graph::Easy::Node/; +\& +\& # override here methods for your node class +\& +\& ###################################################### +\& # when overriding nodes, we also need ::Anon +\& +\& package Graph::Easy::MyNode::Anon; +\& +\& use base qw/Graph::Easy::MyNode/; +\& use base qw/Graph::Easy::Node::Anon/; +\& +\& ###################################################### +\& # and :::Empty +\& +\& package Graph::Easy::MyNode::Empty; +\& +\& use base qw/Graph::Easy::MyNode/; +\& +\& ###################################################### +\& package main; +\& +\& use Graph::Easy::Parser; +\& use Graph::Easy; +\& +\& use Graph::Easy::MyNode; +\& use Graph::Easy::MyNode::Anon; +\& use Graph::Easy::MyNode::Empty; +\& +\& my $parser = Graph::Easy::Parser; +\& +\& $parser\->use_class(\*(Aqnode\*(Aq, \*(AqGraph::Easy::MyNode\*(Aq); +\& +\& my $graph = $parser\->from_text(...); +.Ve +.PP +The object \f(CW$graph\fR will now contain nodes that are of your +custom class instead of plain \f(CW\*(C`Graph::Easy::Node\*(C'\fR. +.PP +When overriding nodes, you also should provide subclasses +for \f(CW\*(C`Graph::Easy::Node::Anon\*(C'\fR and \f(CW\*(C`Graph::Easy::Node::Empty\*(C'\fR, +and make these subclasses of your custom node class as shown +above. For edges, groups and graphs, you need just one subclass. +.SS "\fIfrom_text()\fP" +.IX Subsection "from_text()" +.Vb 1 +\& my $graph = $parser\->from_text( $text ); +.Ve +.PP +Create a Graph::Easy object from the textual description in \f(CW$text\fR. +.PP +Returns undef for error, you can find out what the error was +with \fIerror()\fR. +.PP +This method will reset any previous error, and thus the \f(CW$parser\fR object +can be re-used to parse different texts by just calling \f(CW\*(C`from_text()\*(C'\fR +multiple times. +.SS "\fIfrom_file()\fP" +.IX Subsection "from_file()" +.Vb 2 +\& my $graph = $parser\->from_file( $filename ); +\& my $graph = Graph::Easy::Parser\->from_file( $filename ); +.Ve +.PP +Creates a Graph::Easy object from the textual description in the file +\&\f(CW$filename\fR. +.PP +The second calling style will create a temporary \f(CW\*(C`Graph::Easy::Parser\*(C'\fR object, +parse the file and return the resulting \f(CW\*(C`Graph::Easy\*(C'\fR object. +.PP +Returns undef for error, you can find out what the error was +with \fIerror()\fR when using the first calling style. +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& my $error = $parser\->error(); +.Ve +.PP +Returns the last error, or the empty string if no error occured. +.PP +If you want to catch warnings from the parser, enable catching +of warnings or errors: +.PP +.Vb 1 +\& $parser\->catch_messages(1); +\& +\& # Or individually: +\& # $parser\->catch_warnings(1); +\& # $parser\->catch_errors(1); +\& +\& # something which warns or throws an error: +\& ... +\& +\& if ($parser\->error()) +\& { +\& my @errors = $parser\->errors(); +\& } +\& if ($parser\->warning()) +\& { +\& my @warnings = $parser\->warnings(); +\& } +.Ve +.PP +See Graph::Easy::Base for more details on error/warning message capture. +.SS "\fIparse_error()\fP" +.IX Subsection "parse_error()" +.Vb 1 +\& $parser\->parse_error( $msg_nr, @params); +.Ve +.PP +Sets an error message from a message number and replaces embedded +templates like \f(CW\*(C`##param1##\*(C'\fR with the passed parameters. +.SS "\fI_parse_attributes()\fP" +.IX Subsection "_parse_attributes()" +.Vb 2 +\& my $attributes = $parser\->_parse_attributes( $txt, $class ); +\& my ($att, $multiples) = $parser\->_parse_attributes( $txt, $class ); +.Ve +.PP +\&\fBInternal usage only\fR. Takes a text like this: +.PP +.Vb 1 +\& attribute: value; attribute2 : value2; +.Ve +.PP +and returns a hash with the attributes. +.PP +In list context, also returns the max count of multiple attributes, e.g. +3 when it encounters something like \f(CW\*(C`red|green|blue\*(C'\fR. When +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy. Graph::Easy::Parser::Graphviz and Graph::Easy::Parser::VCG. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2004 \- 2007 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Parser::Graphviz.3pm b/lib/perl/man/man3/Graph::Easy::Parser::Graphviz.3pm new file mode 100644 index 0000000000000000000000000000000000000000..e713a2b33eacf5d2a04a7dd6adf53c2c388c8692 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Parser::Graphviz.3pm @@ -0,0 +1,305 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Parser::Graphviz 3" +.TH Graph::Easy::Parser::Graphviz 3 "2011-12-23" "perl v5.12.4" "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::Easy::Parser::Graphviz \- Parse Graphviz text into Graph::Easy +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& # creating a graph from a textual description +\& +\& use Graph::Easy::Parser::Graphviz; +\& my $parser = Graph::Easy::Parser::Graphviz\->new(); +\& +\& my $graph = $parser\->from_text( +\& "digraph MyGraph { \en" . +\& " Bonn \-> \e"Berlin\e" \en }" +\& ); +\& print $graph\->as_ascii(); +\& +\& print $parser\->from_file(\*(Aqmygraph.dot\*(Aq)\->as_ascii(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Parser::Graphviz\*(C'\fR parses the text format from the \s-1DOT\s0 language +use by Graphviz and constructs a \f(CW\*(C`Graph::Easy\*(C'\fR object from it. +.PP +The resulting object can than be used to layout and output the graph +in various formats. +.PP +Please see the Graphviz manual for a full description of the syntax +rules of the \s-1DOT\s0 language. +.SS "Output" +.IX Subsection "Output" +The output will be a Graph::Easy object (unless overrriden +with \f(CW\*(C`use_class()\*(C'\fR), see the documentation for Graph::Easy what you can do +with it. +.SS "Attributes" +.IX Subsection "Attributes" +Attributes will be remapped to the proper Graph::Easy attribute names and +values, as much as possible. +.PP +Anything else will be converted to custom attributes starting with \*(L"x\-dot\-\*(R". +So \*(L"ranksep: 2\*(R" will become \*(L"x\-dot-ranksep: 2\*(R". +.SH "METHODS" +.IX Header "METHODS" +\&\f(CW\*(C`Graph::Easy::Parser::Graphviz\*(C'\fR supports the same methods +as its parent class \f(CW\*(C`Graph::Easy::Parser\*(C'\fR: +.SS "\fInew()\fP" +.IX Subsection "new()" +.Vb 2 +\& use Graph::Easy::Parser::Graphviz; +\& my $parser = Graph::Easy::Parser::Graphviz\->new(); +.Ve +.PP +Creates a new parser object. There are two valid parameters: +.PP +.Vb 2 +\& debug +\& fatal_errors +.Ve +.PP +Both take either a false or a true value. +.PP +.Vb 2 +\& my $parser = Graph::Easy::Parser::Graphviz\->new( debug => 1 ); +\& $parser\->from_text(\*(Aqdigraph G { A \-> B }\*(Aq); +.Ve +.SS "\fIreset()\fP" +.IX Subsection "reset()" +.Vb 1 +\& $parser\->reset(); +.Ve +.PP +Reset the status of the parser, clear errors etc. Automatically called +when you call any of the \f(CW\*(C`from_XXX()\*(C'\fR methods below. +.SS "\fIuse_class()\fP" +.IX Subsection "use_class()" +.Vb 1 +\& $parser\->use_class(\*(Aqnode\*(Aq, \*(AqGraph::Easy::MyNode\*(Aq); +.Ve +.PP +Override the class to be used to constructs objects while parsing. +.PP +See Graph::Easy::Parser for further information. +.SS "\fIfrom_text()\fP" +.IX Subsection "from_text()" +.Vb 1 +\& my $graph = $parser\->from_text( $text ); +.Ve +.PP +Create a Graph::Easy object from the textual description in \f(CW$text\fR. +.PP +Returns undef for error, you can find out what the error was +with \fIerror()\fR. +.PP +This method will reset any previous error, and thus the \f(CW$parser\fR object +can be re-used to parse different texts by just calling \f(CW\*(C`from_text()\*(C'\fR +multiple times. +.SS "\fIfrom_file()\fP" +.IX Subsection "from_file()" +.Vb 2 +\& my $graph = $parser\->from_file( $filename ); +\& my $graph = Graph::Easy::Parser\->from_file( $filename ); +.Ve +.PP +Creates a Graph::Easy object from the textual description in the file +\&\f(CW$filename\fR. +.PP +The second calling style will create a temporary parser object, +parse the file and return the resulting \f(CW\*(C`Graph::Easy\*(C'\fR object. +.PP +Returns undef for error, you can find out what the error was +with \fIerror()\fR when using the first calling style. +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& my $error = $parser\->error(); +.Ve +.PP +Returns the last error, or the empty string if no error occured. +.SS "\fIparse_error()\fP" +.IX Subsection "parse_error()" +.Vb 1 +\& $parser\->parse_error( $msg_nr, @params); +.Ve +.PP +Sets an error message from a message number and replaces embedded +templates like \f(CW\*(C`##param1##\*(C'\fR with the passed parameters. +.SH "CAVEATS" +.IX Header "CAVEATS" +The parser has problems with the following things: +.IP "encoding and charset attribute" 12 +.IX Item "encoding and charset attribute" +The parser assumes the input to be \f(CW\*(C`utf\-8\*(C'\fR. Input files in <code>Latin1</code> +are not parsed properly, even when they have the charset attribute set. +.IP "shape=record" 12 +.IX Item "shape=record" +Nodes with shape record are only parsed properly when the label does not +contain groups delimited by \*(L"{\*(R" and \*(L"}\*(R", so the following is parsed +wrongly: +.Sp +.Vb 1 +\& node1 [ shape=record, label="A|{B|C}" ] +.Ve +.IP "default shape" 12 +.IX Item "default shape" +The default shape for a node is 'rect', opposed to 'circle' as dot renders +nodes. +.IP "attributes" 12 +.IX Item "attributes" +Some attributes are \fBnot\fR remapped properly to what Graph::Easy expects, thus +losing information, either because Graph::Easy doesn't support this feature +yet, or because the mapping is incomplete. +.Sp +Some attributes meant only for nodes or edges etc. might be incorrectly applied +to other objects, resulting in unnec. warnings while parsing. +.Sp +Attributes not valid in the original \s-1DOT\s0 language are silently ignored by dot, +but result in a warning when parsing under Graph::Easy. This helps catching all +these pesky misspellings, but it's not yet possible to disable these warnings. +.IP "comments" 12 +.IX Item "comments" +Comments written in the source code itself are discarded. If you want to have +comments on the graph, clusters, nodes or edges, use the attribute \f(CW\*(C`comment\*(C'\fR. +These are correctly read in and stored, and then output into the different +formats, too. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy, Graph::Reader::Dot. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2005 \- 2007 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information. diff --git a/lib/perl/man/man3/Graph::Easy::Parser::VCG.3pm b/lib/perl/man/man3/Graph::Easy::Parser::VCG.3pm new file mode 100644 index 0000000000000000000000000000000000000000..29059da0cf29f47f202f3e7841780b03c424e8e8 --- /dev/null +++ b/lib/perl/man/man3/Graph::Easy::Parser::VCG.3pm @@ -0,0 +1,282 @@ +.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) +.\" +.\" 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" '' +'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 turned on, 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. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "Graph::Easy::Parser::VCG 3" +.TH Graph::Easy::Parser::VCG 3 "2011-12-23" "perl v5.12.4" "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::Easy::Parser::VCG \- Parse VCG or GDL text into Graph::Easy +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& # creating a graph from a textual description +\& +\& use Graph::Easy::Parser::VCG; +\& my $parser = Graph::Easy::Parser::VCG\->new(); +\& +\& my $graph = $parser\->from_text( +\& "graph: { \en" . +\& " node: { title: "Bonn" }\en" . +\& " node: { title: "Berlin" }\en" . +\& " edge: { sourcename: "Bonn" targetname: "Berlin" }\en" . +\& "}\en" +\& ); +\& print $graph\->as_ascii(); +\& +\& print $parser\->from_file(\*(Aqmygraph.vcg\*(Aq)\->as_ascii(); +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\f(CW\*(C`Graph::Easy::Parser::VCG\*(C'\fR parses the text format from the \s-1VCG\s0 or \s-1GDL\s0 +(Graph Description Language) use by tools like \s-1GCC\s0 and AiSee, and +constructs a \f(CW\*(C`Graph::Easy\*(C'\fR object from it. +.PP +The resulting object can then be used to layout and output the graph +in various formats. +.SS "Output" +.IX Subsection "Output" +The output will be a Graph::Easy object (unless overrriden +with \f(CW\*(C`use_class()\*(C'\fR), see the documentation for Graph::Easy what you can do +with it. +.SS "Attributes" +.IX Subsection "Attributes" +Attributes will be remapped to the proper Graph::Easy attribute names and +values, as much as possible. +.PP +Anything else will be converted to custom attributes starting with \*(L"x\-vcg\-\*(R". +So \*(L"dirty_edge_labels: yes\*(R" will become \*(L"x\-vcg\-dirty_edge_labels: yes\*(R". +.SH "METHODS" +.IX Header "METHODS" +\&\f(CW\*(C`Graph::Easy::Parser::VCG\*(C'\fR supports the same methods +as its parent class \f(CW\*(C`Graph::Easy::Parser\*(C'\fR: +.SS "\fInew()\fP" +.IX Subsection "new()" +.Vb 2 +\& use Graph::Easy::Parser::VCG; +\& my $parser = Graph::Easy::Parser::VCG\->new(); +.Ve +.PP +Creates a new parser object. There are two valid parameters: +.PP +.Vb 2 +\& debug +\& fatal_errors +.Ve +.PP +Both take either a false or a true value. +.PP +.Vb 2 +\& my $parser = Graph::Easy::Parser::VCG\->new( debug => 1 ); +\& $parser\->from_text(\*(Aqgraph: { }\*(Aq); +.Ve +.SS "\fIreset()\fP" +.IX Subsection "reset()" +.Vb 1 +\& $parser\->reset(); +.Ve +.PP +Reset the status of the parser, clear errors etc. Automatically called +when you call any of the \f(CW\*(C`from_XXX()\*(C'\fR methods below. +.SS "\fIuse_class()\fP" +.IX Subsection "use_class()" +.Vb 1 +\& $parser\->use_class(\*(Aqnode\*(Aq, \*(AqGraph::Easy::MyNode\*(Aq); +.Ve +.PP +Override the class to be used to constructs objects while parsing. +.PP +See Graph::Easy::Parser for further information. +.SS "\fIfrom_text()\fP" +.IX Subsection "from_text()" +.Vb 1 +\& my $graph = $parser\->from_text( $text ); +.Ve +.PP +Create a Graph::Easy object from the textual description in \f(CW$text\fR. +.PP +Returns undef for error, you can find out what the error was +with \fIerror()\fR. +.PP +This method will reset any previous error, and thus the \f(CW$parser\fR object +can be re-used to parse different texts by just calling \f(CW\*(C`from_text()\*(C'\fR +multiple times. +.SS "\fIfrom_file()\fP" +.IX Subsection "from_file()" +.Vb 2 +\& my $graph = $parser\->from_file( $filename ); +\& my $graph = Graph::Easy::Parser::VCG\->from_file( $filename ); +.Ve +.PP +Creates a Graph::Easy object from the textual description in the file +\&\f(CW$filename\fR. +.PP +The second calling style will create a temporary parser object, +parse the file and return the resulting \f(CW\*(C`Graph::Easy\*(C'\fR object. +.PP +Returns undef for error, you can find out what the error was +with \fIerror()\fR when using the first calling style. +.SS "\fIerror()\fP" +.IX Subsection "error()" +.Vb 1 +\& my $error = $parser\->error(); +.Ve +.PP +Returns the last error, or the empty string if no error occured. +.SS "\fIparse_error()\fP" +.IX Subsection "parse_error()" +.Vb 1 +\& $parser\->parse_error( $msg_nr, @params); +.Ve +.PP +Sets an error message from a message number and replaces embedded +templates like \f(CW\*(C`##param1##\*(C'\fR with the passed parameters. +.SH "CAVEATS" +.IX Header "CAVEATS" +The parser has problems with the following things: +.IP "attributes" 12 +.IX Item "attributes" +Some attributes are \fBnot\fR remapped properly to what Graph::Easy expects, thus +losing information, either because Graph::Easy doesn't support this feature +yet, or because the mapping is incomplete. +.IP "comments" 12 +.IX Item "comments" +Comments written in the source code itself are discarded. If you want to have +comments on the graph, clusters, nodes or edges, use the attribute \f(CW\*(C`comment\*(C'\fR. +These are correctly read in and stored, and then output into the different +formats, too. +.SH "EXPORT" +.IX Header "EXPORT" +Exports nothing. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +Graph::Easy, Graph::Write::VCG. +.SH "AUTHOR" +.IX Header "AUTHOR" +Copyright (C) 2005 \- 2008 by Tels <http://bloodgate.com> +.PP +See the \s-1LICENSE\s0 file for information.