Previous Page Next Page Contents

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

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




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000