## `Network::delVertex` -- deletes one or several vertices from a network

#### Introduction

``Network::delVertex`(G, v)` deletes the vertex `v` from network `G`.

#### Call(s)

`Network::delVertex(G, v)`
`Network::delVertex(G, l)`

#### Parameters

`l` | - | list of expressions
`v` | - | expression
`G` | - | network

#### Returns

the smaller network

#### Details

- `Network::delVertex``(G, v)` deletes the node `v` from the network `G`.
- ``Network::delVertex`(G, [v1, ..., vn])` deletes the nodes `v1, ..., vn` from the network `G`.
- The attempt to delete a node which is not in `G` causes an error.

#### Example 1

Deleting a vertex from a network also deletes all edges connected to it:

    >> N1 := Network::cycle([v1,v2,v3]):
       Network::printGraph(N1)

                              Vertices: [v1, v2, v3]

                       Edges: [[v1, v2], [v2, v3], [v3, v1]]

                       Vertex weights: table(v3=0,v2=0,v1=0)

             Edge capacities: table([v3, v1]=1,[v2, v3]=1,[v1, v2]=1)

               Edge weights: table([v3, v1]=1,[v2, v3]=1,[v1, v2]=1)

               Adjacency list (out): table(v3=[v1],v2=[v3],v1=[v2])

                Adjacency list (in): table(v3=[v2],v2=[v1],v1=[v3])

    >> N2 := Network::delVertex(N1, v3):
       Network::printGraph(N2)

                                Vertices: [v1, v2]

                                 Edges: [[v1, v2]]

                         Vertex weights: table(v2=0,v1=0)

                        Edge capacities: table([v1, v2]=1)

                          Edge weights: table([v1, v2]=1)

                    Adjacency list (out): table(v2=[],v1=[v2])

                     Adjacency list (in): table(v2=[v1],v1=[])

#### Changes

- used to be called `Network::DelVertex`

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000