Graph:...encyMap(3pm)
β¨ NAME β¨
Graph::AdjacencyMap β bestie, it's a map of graph vertices or edges π
πΈ SYNOPSIS πΈ
Internal.
yeah that's it. that's the whole synopsis. it's giving mysterious. it's giving "you're not supposed to be here" π
π¦ DESCRIPTION π¦
Okay so listen π«Ά this module is meant for internal use by the Graph module. Like, it's the backstage crew, the stagehands, the lighting techs of the whole Graph operation. You can poke at it but it's not for you, bestie, no cap.
π OBJECT METHODS π
π del_path(@seq)
Delete a Map path. gone. poof. bye bye π
π del_path_by_multi_id(@seq, $id)
Delete a Map path by a multi(vertex) id. same energy, different lookup key β¨
π get_multi_ids(@seq)
Return the multi ids. all of them. the whole squad π
π has_path(@seq)
Returns the integer ID of the path, or undef if Map doesn't have it. so like, if it's there you get a cute lil number, and if it's not you get undef which is basically the shrug emoji of Perl π€·
π has_any_paths
Return true if the Map has any paths, false if not. simple as. vibe check on the whole Map π
π has_path_by_multi_id(@seq, $id)
Return true if the Map has the path by a multi(vertex) id, false if not. yes/no, iconic behavior β
π paths
Return all the paths (left-hand sides) of the Map. the LHS girlies β¨
π ids
Return all the right-hand sides of the Map, unsorted. key word: UNSORTED. do not come for me about the order, it did not promise you anything π
π set_paths(@seq1, @seq2, ...)
@ids = set_paths($seq1, $seq2, ...)
Create/identify the path of "$seq*". Returns the integer ID of each path.
Important lore: for arity other than 1, the sequence items must be integers. For arity 1, do not wrap the item in an array. And for "_UNORD", you must give the sequence already sorted β like, pre-sorted, you gotta do the work yourself, the module is not your personal assistant π
π set_path_by_multi_id(@seq, $id)
($integer_ID, $multi_ID) = $m->set_path_by_multi_id(\@seq, $id)
Set the path in the Map by the multi id. two return values, double the slay π β¨
π 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 $deep option is useful with directed hyperedges β hyperedges are giving main character energy fr fr π
π get_ids_by_paths
@ids = $m->get_ids_by_paths([ \@seq1, \@seq2... ], $ensure, 0);
@id_lists = $m->get_ids_by_paths([ \@seq1, \@seq2... ], $ensure, 1);
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.
If $ensure is true, it 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 β like, the whole thing just ghosts you π
If $deep 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. yes, 2. that's the ceiling bestie, don't push it π
π rename_path($from, $to)
Rename the path. glow-up complete β¨
π stringify
Return a string describing the object in a human-friendly(ish) way. note the (ish). the module is being honest with you and I respect that π«Ά
π successors
@successors = $m->successors(@v)
Only valid for a map of arity other than 1. do not try this on arity 1, it will not go well π
π predecessors
@predecessors = $m->predecessors($v)
Only valid for a non-"_UNORD" map of arity other than 1. so: not _UNORD, and not arity 1. two whole conditions. read them both π
π paths_from
@paths = $m->paths_from(@v)
Only valid for a map of arity other than 1. same deal, arity 1 girlies sit this one out π
π paths_to
@paths = $m->paths_to($v)
Only valid for a non-"_UNORD" map of arity other than 1. yes the _UNORD restriction again. it's consistent, okay, it's a whole thing πΈ
π has_successor
$bool = $m->has_successor($u, $v)
Only valid for a map of arity other than 1. returns a bool, which is honestly the most chill thing in this whole doc π
π reindex
Will recreate the mapping from paths to indexes. Intended for use after a deep copy. like, deep copy leaves a mess, this is the cleanup crew π§Ήβ¨
π AUTHOR AND COPYRIGHT π
Jarkko Hietaniemi jhi@iki.fi
shoutout to Jarkko, absolute legend, we stan π
π LICENSE π
This module is licensed under the same terms as Perl itself. periodt. π
okay bestie that's the whole page π this was perl v5.40.1, dated 2025-03-28, and it's the Graph:...encyMap(3pm) page from the User Contributed Perl Documentation. mwah, go read the actual Graph docs now, ily, bye β¨π¦πΈ
π¦ where this page comes from
- debian trixie: libgraph-perl 1:0.9735-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgraph-perl 1:0.9735-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgraph-perl 1:0.9735-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms