1Graph::AdjacencyMap(3)User Contributed Perl DocumentationGraph::AdjacencyMap(3)
2
3
4
6 Graph::AdjacencyMap - map of graph vertices or edges
7
9 Internal.
10
12 This module is meant for internal use by the Graph module.
13
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 (left-hand sides) of the Map.
36
37 ids
38 Return all the right-hand sides of the Map, unsorted.
39
40 set_paths(\@seq1, \@seq2, ...)
41 @ids = set_paths($seq1, $seq2, ...)
42
43 Create/identify the path of "$seq*". Returns the integer ID of each
44 path. For arity other than 1, the sequence items must be integers.
45 For arity 1, do not wrap the item in an array. For "_UNORD", you must
46 give the sequence already sorted.
47
48 set_path_by_multi_id(\@seq, $id)
49 ($integer_ID, $multi_ID) = $m->set_path_by_multi_id(\@seq, $id)
50
51 Set the path in the Map by the multi id.
52
53 get_paths_by_ids([ \@idlist1, \@idlist2... ], $deep)
54 Given an array-ref of array-refs of vertex IDs, returns a list of
55 array-refs of vertex-names. This is to look up vertex paths for use in
56 edges. Only useful for arity 1. The $deep option is useful with
57 directed hyperedges.
58
59 get_ids_by_paths
60 @ids = $m->get_ids_by_paths([ \@seq1, \@seq2... ], $ensure, 0);
61 @id_lists = $m->get_ids_by_paths([ \@seq1, \@seq2... ], $ensure, 1);
62
63 This is to look up vertex IDs for use in edges. Only useful for arity
64 1. Given an array-ref of array-refs with paths, returns a list of IDs
65 of existing paths.
66
67 If $ensure is true, will first create paths that do not already exist.
68 If it is not, any non-existing paths will cause an empty list to be
69 returned.
70
71 If $deep is true, each sequence will be treated as a list of paths, and
72 IDs filled in for the return values. This can have a value up to 2.
73
74 rename_path($from, $to)
75 Rename the path.
76
77 stringify
78 Return a string describing the object in a human-friendly(ish) way.
79
80 successors
81 @successors = $m->successors(@v)
82
83 Only valid for a map of arity other than 1.
84
85 predecessors
86 @predecessors = $m->predecessors($v)
87
88 Only valid for a non-"_UNORD" map of arity other than 1.
89
90 paths_from
91 @paths = $m->paths_from(@v)
92
93 Only valid for a map of arity other than 1.
94
95 paths_to
96 @paths = $m->paths_to($v)
97
98 Only valid for a non-"_UNORD" map of arity other than 1.
99
100 has_successor
101 $bool = $m->has_successor($u, $v)
102
103 Only valid for a map of arity other than 1.
104
105 reindex
106 Will recreate the mapping from paths to indexes. Intended for use after
107 a deep copy.
108
110 Jarkko Hietaniemi jhi@iki.fi
111
113 This module is licensed under the same terms as Perl itself.
114
115
116
117perl v5.38.0 2023-07-25 Graph::AdjacencyMap(3)