Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Graph::printEdgeCostInformation

Prints the edge costs of a graph

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

Graph::printEdgeCostInformation(G)

Description

Graph::printEdgeCostInformation prints the edge costs of a graph.

Graph::printEdgeCostInformation(G) prints the edge costs of the graph G

Examples

Example 1

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

G := Graph::createCircleGraph(3):
Graph::printEdgeCostInformation(G)
No edge costs defined.
G := Graph::setEdgeCosts(G, [[1, 2], [2, 3], [3, 1]], [10, 20, 30]):
Graph::printEdgeCostInformation(G)
Edge costs existing in the graph:
----------------------------------------
Edge [1, 2] has cost 10
Edge [2, 3] has cost 20
Edge [3, 1] has cost 30

Parameters

G

Graph

Return Values

Text containing information about the edge costs of a graph.

Was this topic helpful?