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::getEdges

Returns a list with all edges

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::getEdges(G)

Description

Graph::getEdges(G) returns a list containing all edges of the graph G. Each edge is represented by a list containing the two connected vertices.

Examples

Example 1

Graph::getEdges only returns the edges, without their capacities:

G1 := Graph::createCircleGraph([v1, v2, v3, v4]):
Graph::getEdges(G1)

G2 := Graph::createCompleteGraph(3):
Graph::getEdges(G2)

Parameters

G

A Graph

Return Values

List of all edges, a list of lists

Was this topic helpful?