DOKK / manpages / debian 12 / libgraph-perl / Graph::AdjacencyMap.3pm.en
Graph::AdjacencyMap(3pm) User Contributed Perl Documentation Graph::AdjacencyMap(3pm)

Graph::AdjacencyMap - map of graph vertices or edges

    Internal.

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

Delete a Map path.

Delete a Map path by a multi(vertex) id.

Return the multi ids.

Returns the integer ID of the path, or undef if Map doesn't have it.

Return true if the Map has any paths, false if not.

Return true if the Map has the path by a multi(vertex) id, false if not.

Return all the paths of the Map.

    @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.

    ($integer_ID, $multi_ID) = $m->set_path_by_multi_id(\@seq, $id)

Set the path in the Map by the multi id.

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.

    @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 the path.

Return a string describing the object in a human-friendly(ish) way.

    @successors = $m->successors(@v)

Only valid for a map of arity other than 1.

    @predecessors = $m->predecessors($v)

Only valid for a non-"_UNORD" map of arity other than 1.

    @paths = $m->paths_from(@v)

Only valid for a map of arity other than 1.

    @paths = $m->paths_to($v)

Only valid for a non-"_UNORD" map of arity other than 1.

    $bool = $m->has_successor($u, $v)

Only valid for a map of arity other than 1.

Will recreate the mapping from paths to indexes. Intended for use after a deep copy.

Jarkko Hietaniemi jhi@iki.fi

This module is licensed under the same terms as Perl itself.

2023-02-13 perl v5.36.0