Graph::printGraphInformation

Prints the edges of a graph

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

Graph::printGraphInformation(G)

Description

Graph::printGraphInformation prints a summary of various information about a graph.

Graph::printGraphInformation(G) prints a summary of the graph G

Examples

Example 1

A circle graph is created and a summary of it printed to screen:

G := Graph::createCircleGraph(3):
Graph::printGraphInformation(G)
Vertices: [1, 2, 3]
Edges: [[1, 2], [2, 3], [3, 1]]
Vertex weights: no vertex weights.
Edge descriptions: no edge descriptions.
Edge weights: no edge weights.
Edge costs: no edge costs.
Adjacency list (out): 1 = [2], 2 = [3], 3 = [1]
Adjacency list (in): 1 = [3], 2 = [1], 3 = [2]
Graph is directed.

Example 2

A complete graph is created and a summary of it printed to screen:

G := Graph::createCompleteGraph(3):
Graph::printGraphInformation(G)
Vertices: [1, 2, 3]
Edges: [[1, 2], [1, 3], [2, 1], [2, 3], [3, 1], [3, 2]]
Vertex weights: no vertex weights.
Edge descriptions: no edge descriptions.
Edge weights: no edge weights.
Edge costs: no edge costs.
Adjacency list (out): 1 = [2, 3], 2 = [1, 3], 3 = [1, 2]
Adjacency list (in): 1 = [2, 3], 2 = [1, 3], 3 = [1, 2]
Graph is undirected.

Parameters

G

Graph

Return Values

Text containing information about the graph.

Was this topic helpful?