table of contents
Graph::AdjacencyMap(3pm) | User Contributed Perl Documentation | Graph::AdjacencyMap(3pm) |
NAME¶
Graph::AdjacencyMap - map of graph vertices or edges
SYNOPSIS¶
Internal.
DESCRIPTION¶
This module is meant for internal use by the Graph module.
OBJECT METHODS¶
del_path(\@seq)¶
Delete a Map path.
del_path_by_multi_id(\@seq, $id)¶
Delete a Map path by a multi(vertex) id.
get_multi_ids(\@seq)¶
Return the multi ids.
has_path(\@seq)¶
Returns the integer ID of the path, or undef if Map doesn't have it.
has_any_paths¶
Return true if the Map has any paths, false if not.
has_path_by_multi_id(\@seq, $id)¶
Return true if the Map has the path by a multi(vertex) id, false if not.
paths¶
Return all the paths (left-hand sides) of the Map.
ids¶
Return all the right-hand sides of the Map, unsorted.
set_paths(\@seq1, \@seq2, ...)¶
@ids = set_paths($seq1, $seq2, ...)
Create/identify the path of "$seq*". Returns the integer ID 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 "_UNORD", you must give the sequence already sorted.
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.
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.
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, 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.
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.
rename_path($from, $to)¶
Rename the path.
stringify¶
Return a string describing the object in a human-friendly(ish) way.
successors¶
@successors = $m->successors(@v)
Only valid for a map of arity other than 1.
predecessors¶
@predecessors = $m->predecessors($v)
Only valid for a non-"_UNORD" map of arity other than 1.
paths_from¶
@paths = $m->paths_from(@v)
Only valid for a map of arity other than 1.
paths_to¶
@paths = $m->paths_to($v)
Only valid for a non-"_UNORD" map of arity other than 1.
has_successor¶
$bool = $m->has_successor($u, $v)
Only valid for a map of arity other than 1.
reindex¶
Will recreate the mapping from paths to indexes. Intended for use after a deep copy.
AUTHOR AND COPYRIGHT¶
Jarkko Hietaniemi jhi@iki.fi
LICENSE¶
This module is licensed under the same terms as Perl itself.
2024-07-01 | perl v5.38.2 |