1Graph::AdjacencyMap(3)User Contributed Perl DocumentationGraph::AdjacencyMap(3)
2
3
4

NAME

6       Graph::AdjacencyMap - map of graph vertices or edges
7

SYNOPSIS

9           Internal.
10

DESCRIPTION

12       This module is meant for internal use by the Graph module.
13

OBJECT METHODS

15   del_path(\@seq)
16       Delete a Map path.
17
18   del_path_by_multi_id(\@seq, $id)
19       Delete a Map path by a multi(vertex) id.
20
21   get_multi_ids(\@seq)
22       Return the multi ids.
23
24   has_path(\@seq)
25       Returns the integer ID of the path, or undef if Map doesn't have it.
26
27   has_any_paths
28       Return true if the Map has any paths, false if not.
29
30   has_path_by_multi_id(\@seq, $id)
31       Return true if the Map has the path by a multi(vertex) id, false if
32       not.
33
34   paths
35       Return all the paths of the Map.
36
37   set_paths(\@seq1, \@seq2, ...)
38           @ids = set_paths($seq1, $seq2, ...)
39
40       Create/identify the path of "$seq*". Returns the integer ID of each
41       path.  For arity other than 1, the sequence items must be integers.
42       For arity 1, do not wrap the item in an array.  For "_UNORD", you must
43       give the sequence already sorted.
44
45   set_path_by_multi_id(\@seq, $id)
46           ($integer_ID, $multi_ID) = $m->set_path_by_multi_id(\@seq, $id)
47
48       Set the path in the Map by the multi id.
49
50   get_paths_by_ids([ \@idlist1, \@idlist2... ], $deep)
51       Given an array-ref of array-refs of vertex IDs, returns a list of
52       array-refs of vertex-names.  This is to look up vertex paths for use in
53       edges. Only useful for arity 1.  The $deep option is useful with
54       directed hyperedges.
55
56   get_ids_by_paths
57           @ids = $m->get_ids_by_paths([ \@seq1, \@seq2... ], $ensure, 0);
58           @id_lists = $m->get_ids_by_paths([ \@seq1, \@seq2... ], $ensure, 1);
59
60       This is to look up vertex IDs for use in edges. Only useful for arity
61       1.  Given an array-ref of array-refs with paths, returns a list of IDs
62       of existing paths.
63
64       If $ensure is true, will first create paths that do not already exist.
65       If it is not, any non-existing paths will cause an empty list to be
66       returned.
67
68       If $deep is true, each sequence will be treated as a list of paths, and
69       IDs filled in for the return values. This can have a value up to 2.
70
71   rename_path($from, $to)
72       Rename the path.
73
74   stringify
75       Return a string describing the object in a human-friendly(ish) way.
76
77   successors
78           @successors = $m->successors(@v)
79
80       Only valid for a map of arity other than 1.
81
82   predecessors
83           @predecessors = $m->predecessors($v)
84
85       Only valid for a non-"_UNORD" map of arity other than 1.
86
87   paths_from
88           @paths = $m->paths_from(@v)
89
90       Only valid for a map of arity other than 1.
91
92   paths_to
93           @paths = $m->paths_to($v)
94
95       Only valid for a non-"_UNORD" map of arity other than 1.
96
97   has_successor
98           $bool = $m->has_successor($u, $v)
99
100       Only valid for a map of arity other than 1.
101
102   reindex
103       Will recreate the mapping from paths to indexes. Intended for use after
104       a deep copy.
105
107       Jarkko Hietaniemi jhi@iki.fi
108

LICENSE

110       This module is licensed under the same terms as Perl itself.
111
112
113
114perl v5.34.0                      2022-01-21            Graph::AdjacencyMap(3)
Impressum