Graph::printEdgeWeightInformation

Prints the edge weights of a graph

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

Graph::printEdgeWeightInformation(G)

Description

Graph::printEdgeWeightInformation prints the edge weights of a graph.

Graph::printEdgeWeightInformation(G) prints the edge weights of the graph G

Examples

Example 1

A circle graph is created and the edge weights of it printed to screen:

G := Graph::createCircleGraph(3):
Graph::printEdgeWeightInformation(G)
No edge weights defined.
G := Graph::setEdgeWeights(G, [[1, 2], [2, 3], [3, 1]], [10, 20, 30]):
Graph::printEdgeWeightInformation(G)
Edge weights existing in the graph:
----------------------------------------
Edge [1, 2] has weight 10
Edge [2, 3] has weight 20
Edge [3, 1] has weight 30

Parameters

G

Graph

Return Values

Text containing information about the edge weights of a graph.

Was this topic helpful?