.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Graph::AdjacencyMap 3pm" .TH Graph::AdjacencyMap 3pm "2023-10-31" "perl v5.36.0" "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::AdjacencyMap \- map of graph vertices or edges .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& Internal. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBThis module is meant for internal use by the Graph module.\fR .SH "OBJECT METHODS" .IX Header "OBJECT METHODS" .SS "del_path(\e@seq)" .IX Subsection "del_path(@seq)" Delete a Map path. .ie n .SS "del_path_by_multi_id(\e@seq, $id)" .el .SS "del_path_by_multi_id(\e@seq, \f(CW$id\fP)" .IX Subsection "del_path_by_multi_id(@seq, $id)" Delete a Map path by a multi(vertex) id. .SS "get_multi_ids(\e@seq)" .IX Subsection "get_multi_ids(@seq)" Return the multi ids. .SS "has_path(\e@seq)" .IX Subsection "has_path(@seq)" Returns the integer \s-1ID\s0 of the path, or undef if Map doesn't have it. .SS "has_any_paths" .IX Subsection "has_any_paths" Return true if the Map has any paths, false if not. .ie n .SS "has_path_by_multi_id(\e@seq, $id)" .el .SS "has_path_by_multi_id(\e@seq, \f(CW$id\fP)" .IX Subsection "has_path_by_multi_id(@seq, $id)" Return true if the Map has the path by a multi(vertex) id, false if not. .SS "paths" .IX Subsection "paths" Return all the paths (left-hand sides) of the Map. .SS "ids" .IX Subsection "ids" Return all the right-hand sides of the Map, unsorted. .SS "set_paths(\e@seq1, \e@seq2, ...)" .IX Subsection "set_paths(@seq1, @seq2, ...)" .Vb 1 \& @ids = set_paths($seq1, $seq2, ...) .Ve .PP Create/identify the path of \f(CW\*(C`$seq*\*(C'\fR. Returns the integer \s-1ID\s0 of each path. For arity other than 1, the sequence items must be integers. For arity 1, do not wrap the item in an array. For \f(CW\*(C`_UNORD\*(C'\fR, you must give the sequence already sorted. .ie n .SS "set_path_by_multi_id(\e@seq, $id)" .el .SS "set_path_by_multi_id(\e@seq, \f(CW$id\fP)" .IX Subsection "set_path_by_multi_id(@seq, $id)" .Vb 1 \& ($integer_ID, $multi_ID) = $m\->set_path_by_multi_id(\e@seq, $id) .Ve .PP Set the path in the Map by the multi id. .ie n .SS "get_paths_by_ids([ \e@idlist1, \e@idlist2... ], $deep)" .el .SS "get_paths_by_ids([ \e@idlist1, \e@idlist2... ], \f(CW$deep\fP)" .IX Subsection "get_paths_by_ids([ @idlist1, @idlist2... ], $deep)" Given an array-ref of array-refs of vertex IDs, returns a list of array-refs of vertex-names. This is to look up vertex paths for use in edges. Only useful for arity 1. The \f(CW$deep\fR option is useful with directed hyperedges. .SS "get_ids_by_paths" .IX Subsection "get_ids_by_paths" .Vb 2 \& @ids = $m\->get_ids_by_paths([ \e@seq1, \e@seq2... ], $ensure, 0); \& @id_lists = $m\->get_ids_by_paths([ \e@seq1, \e@seq2... ], $ensure, 1); .Ve .PP This is to look up vertex IDs for use in edges. Only useful for arity 1. Given an array-ref of array-refs with paths, returns a list of IDs of existing paths. .PP If \f(CW$ensure\fR is true, will first create paths that do not already exist. If it is not, any non-existing paths will cause an empty list to be returned. .PP If \f(CW$deep\fR is true, each sequence will be treated as a list of paths, and IDs filled in for the return values. This can have a value up to 2. .ie n .SS "rename_path($from, $to)" .el .SS "rename_path($from, \f(CW$to\fP)" .IX Subsection "rename_path($from, $to)" Rename the path. .SS "stringify" .IX Subsection "stringify" Return a string describing the object in a human\-friendly(ish) way. .SS "successors" .IX Subsection "successors" .Vb 1 \& @successors = $m\->successors(@v) .Ve .PP Only valid for a map of arity other than 1. .SS "predecessors" .IX Subsection "predecessors" .Vb 1 \& @predecessors = $m\->predecessors($v) .Ve .PP Only valid for a non\-\f(CW\*(C`_UNORD\*(C'\fR map of arity other than 1. .SS "paths_from" .IX Subsection "paths_from" .Vb 1 \& @paths = $m\->paths_from(@v) .Ve .PP Only valid for a map of arity other than 1. .SS "paths_to" .IX Subsection "paths_to" .Vb 1 \& @paths = $m\->paths_to($v) .Ve .PP Only valid for a non\-\f(CW\*(C`_UNORD\*(C'\fR map of arity other than 1. .SS "has_successor" .IX Subsection "has_successor" .Vb 1 \& $bool = $m\->has_successor($u, $v) .Ve .PP Only valid for a map of arity other than 1. .SS "reindex" .IX Subsection "reindex" Will recreate the mapping from paths to indexes. Intended for use after a deep copy. .SH "AUTHOR AND COPYRIGHT" .IX Header "AUTHOR AND COPYRIGHT" Jarkko Hietaniemi \fIjhi@iki.fi\fR .SH "LICENSE" .IX Header "LICENSE" This module is licensed under the same terms as Perl itself.