Documentation

Contents

Graph::getAdjacentEdgesEntering

Returns the incident edges.

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

Graph::getAdjacentEdgesEntering(G, Vertex)

Description

Graph::getAdjacentEdgesEntering(G, Vertex) returns a list with vertices v1..vn, where [v1, Vertex] .. [vn, Vertex] are incident (incoming) Edges to Vertex.

Examples

Example 1

First, a complete graph is defined:

G1 := Graph::createCompleteGraph(5):
Graph::printGraphInformation(G1)
Vertices: [1, 2, 3, 4, 5]
Edges: [[1, 2], [1, 3], [1, 4], [1, 5], [2, 1], [2, 3], [2, 4], [2, 5], [3, 1], [3, 2], [3, 4], [3, 5], [4, 1], [4, 2],\
 [4, 3], [4, 5], [5, 1], [5, 2], [5, 3], [5, 4]]
Vertex weights: no vertex weights.
Edge descriptions: no edge descriptions.
Edge weights: no edge weights.
Edge costs: no edge costs.
Adjacency list (out): 1 = [2, 3, 4, 5], 2 = [1, 3, 4, 5], 3 = [1, 2, 4, 5], 4 = [1, 2, 3, 5], 5 = [1, 2, 3, 4]
Adjacency list (in): 1 = [2, 3, 4, 5], 2 = [1, 3, 4, 5], 3 = [1, 2, 4, 5], 4 = [1, 2, 3, 5], 5 = [1, 2, 3, 4]
Graph is undirected.

Now we get the vertices that form all incident edges [2, 1] .. [5, 1]:

Graph::getAdjacentEdgesEntering(G1, [1])

Now we get the vertices that form all incident edges [1, 5] .. [4, 5]:

Graph::getAdjacentEdgesEntering(G1, [5])

Parameters

G

A graph

Vertex

One vertex of G.

Return Values

List

Was this topic helpful?