Contents

Graph::getEdgeDescriptions

Returns a table with the edge descriptions.

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

Graph::getEdgeDescriptions(G)

Description

Graph::getEdgeDescriptions(G) returns a table with the edge descriptions of the graph G. Thus Graph::getEdgeDescriptions(G) returns the weight of all edges in G.

    Note:   Descriptions will most probably only be defined, if transportation problems occur.

    Note:   If FAIL is returned, no descriptions were defined (this way both, network and graph algorithms handle this situation correct.)

Examples

Example 1

First lets define a graph without edge descriptions:

G1 := Graph::createCircleGraph(3):
Graph::getEdgeDescriptions(G1)

FAIL was returned, because no edge descriptions were defined.

Graph::getEdges(G1);
G1 := Graph::setEdgeDescriptions(G1, [[1, 2], [3, 1]], 
                                 ["Shortcut", "Highway 66"]):
Graph::getEdgeDescriptions(G1)

The first output shows all the edges and the second one the assigned edge descriptions.

Parameters

G

A graph

Return Values

Table

Was this topic helpful?