Graph::AdjacencyMap(3pm)

Graph::AdjacencyMap3pm

Map of graph vertices or edges

Usage

    Internal.

Overview

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.

Releases

10 releases since Debian 4.0 (Etch); the text changed 7 times.

  1. 4.0–5.0
  2. 6.0–7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

License

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

From libgraph-perl 1:0.9735-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.