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

Returns the outgoing 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::getEdgesLeaving(G)

Description

Graph::getEdgesLeaving(G) returns a table with the adjacency lists for adjacent (outgoing) edges. Thus Graph::getEdgesLeaving(G) returns a table containing all those vertices w for which there is an edge [v,w] in G.

Examples

Example 1

A small directed graph is created to show the outgoing (adjacent) edges:

V := [1, 2, 3, 4, 5]:
Ed := [[1, 2], [1, 3], [2, 3], [2, 4], [3, 4], [3, 5], [4, 5]]:
G1 := Graph(V, Ed, Directed):
Graph::getEdgesLeaving(G1)

In an undirected graph the output could look like this:

G1 := Graph::createCompleteGraph(5):
Graph::getEdgesLeaving(G1)

Parameters

G

A graph

Return Values

Table

Was this topic helpful?