Documentation Center

  • Trial Software
  • Product Updates

Graph::printEdgeCostInformation

Prints the edge costs of a graph

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

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?