GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Devel::MAT::Graph(3) User Contributed Perl Documentation Devel::MAT::Graph(3)

"Devel::MAT::Graph" - a set of references between related SVs

Instances of this class represent an entire graph of references between related SVs, as a helper method for return values from various Devel::MAT methods, which might be used for some sort of screen layout or other analysis tasks.

   $graph = Devel::MAT::Graph->new( $dumpfile )

Constructs a new "Devel::MAT::Graph" instance backed by the given dumpfile (which is only actually used to make the "$node->sv" method work).

   $graph->add_sv( $sv )

Makes the graph aware of the given Devel::MAT::SV. This is not strictly necessary before calling "add_ref" or "add_root", but ensures that "has_sv" will return true immediately after it, and so can be used as a sentinel for recursion control.

   $graph->add_ref( $from_sv, $to_sv, $desc )

Adds an edge to the graph, from and to the given SVs, with the given description.

   $graph->add_root( $from_sv, $desc )

Adds a root edge to the graph, at the given SV with the given description.

   $bool = $graph->has_sv( $sv )

Returns true if the graph has edges or roots for the given SV, or it has at least been given to "add_sv".

   $node = $graph->get_sv_node( $sv )

Returns a "Node" object for the given SV.

   @desc_nodes = $graph->get_root_nodes

Returns an even-sized list of pairs, containing root descriptions and the nodes having those roots, in no particular order.

The values returned by "get_sv_node" respond to the following methods:

   $graph = $node->graph

Returns the containing "Devel::MAT::Graph" instance.

   $addr = $node->addr

Returns the address of the SV represented by this node.

   $sv = $node->sv

Returns the SV object itself, as taken from the dumpfile instance.

   @roots = $node->roots

Returns any root descriptions given (by calls to "$graph->add_root" for the SV at this node.

   $graph->add_root( $sv, $desc );

   ( $desc, ... ) = $graph->get_sv_node( $sv )->roots

   @edges = $node->edges_out

Returns an even-sized list of any edge descriptions and more "Node" objects given as references (by calls to "$graph->add_ref") from the SV at this node.

   $graph->add_ref( $from_sv, $to_sv, $desc )

   ( $desc, $to_edge, ... ) = $graph->get_sv_node( $from_sv )->edges_out

   $n_edges = $node->edges_out

In scalar context, returns the number of edges that exist; i.e. half the size of the pairlist that would be returned in list context.

   @edges = $node->edges_in

Similar to "edges_out", but returns edges in the opposite direction; i.e. edges of references to this node.

   $graph->add_ref( $from_sv, $to_sv, $desc )

   ( $desc, $from_edge, ... ) = $graph->get_sv_node( $to_sv )->edges_in

   $n_edges = $node->edges_out

In scalar context, returns the number of edges that exist; i.e. half the size of the pairlist that would be returned in list context.

Paul Evans <leonerd@leonerd.org.uk>
2022-04-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.