## `Network::epost, Network::epre` -- adjacency lists

#### Introduction

`Network::epost(G)` returns the direct successors of each vertex in the network `G`.

`Network::epre(G)` returns the direct predecessors of each vertex in the network `G`.

#### Call(s)

`Network::epost(G)`
`Network::epre(G)`

#### Parameters

`G` | - | a network

#### Returns

a table

#### Details

- `Network::epost(G)` returns a table with the adjacency lists for outgoing edges. Thus `Network::epost(G)[v]` is a list containing all those nodes `w` for which there is an edge `[v,w]` in the network.
- `Network::epre(G)` returns a table with the adjacency lists for incoming edges. Thus `Network::epre(G)[v]` is a list containing all those nodes `w` for which there is an edge `[w,v]` in the network.

#### Example 1

Since networks are directed, the output of `epost` and `epre` may differ:

    >> V := [1,2,3,4,5]:
       Ed := [[1,2], [1,3], [2,3], [2,4], [3,4], [3,5], [4,5]]:
       N1 := Network(V, Ed):
       Network::epost(N1), Network::epre(N1)

                           table(         table(
                             5 = [],        5 = [3, 4],
                             4 = [5],       4 = [2, 3],
                             3 = [4, 5],,   3 = [1, 2],
                             2 = [3, 4],    2 = [1],
                             1 = [2, 3]     1 = []
                           )              )

Of course, it is possible to model undirected graphs with the `Network` package:

    >> N2 := Network::complete(4):
       Network::epost(N2), Network::epre(N2)

                        table(            table(
                          4 = [1, 2, 3],    4 = [1, 2, 3],
                          3 = [1, 2, 4],,   3 = [1, 2, 4],
                          2 = [1, 3, 4],    2 = [1, 3, 4],
                          1 = [2, 3, 4]     1 = [2, 3, 4]
                        )                 )

#### Changes

- used to be called `[`
- Network::epost]Network::Epost
- used to be called `[`
- Network::epre]Network::Epre

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