Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```Graph::getAdjacentEdgesLeaving(G, Vertex)
```

## Description

Graph::getAdjacentEdgesLeaving(G, Vertex) returns a list with vertices v1..vn, where [Vertex, v1] .. [Vertex, vn] are adjacent (outgoing) 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 adjacent edges [1, 2] .. [1, 5]:

`Graph::getAdjacentEdgesLeaving(G1, [1])`

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

`Graph::getAdjacentEdgesLeaving(G1, [2])`

## Parameters

 G A graph Vertex One vertex of G.

List