networks(deprecated)/ancestor - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : networks(deprecated)/ancestor

networks

  

ancestor

  

finds ancestors in a directed tree

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

ancestor(v, G)

ancestor(G)

Parameters

G

-

graph or network

v

-

vertex or set of vertices

Description

• 

Important: The networks package has been deprecated.  Use the superseding package GraphTheory instead.

• 

Given a vertex v this routine reports the set of known ancestors of v in the graph G.  Such relationships are not always present in a give graph but are explicitly established by routines such as spantree() and shortpathtree(). Routines such as path() rely on this information when looking for paths and will return FAIL if it is not present.

• 

If only the graph is mentioned then the actual ancestor table indexed by vertices and specifying all known ancestors in G is returned. Modifications to this table affect the actual graph.

• 

In the two argument case, the first argument v may also be a set of vertices in which case the result is the set of ancestors of the subgraph induced by v in G (ie. (the union of the ancestors of each vertex in v minus the vertices in v).

• 

The implementation of ancestor and daughter is completely separate from that of directed edges.

• 

This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[ancestor](...).

Examples

Important: The networks package has been deprecated.  Use the superseding package GraphTheory instead.

withnetworks:

Gpetersen:

ancestor1,G

(1)

TshortpathtreeG,1:

ancestor8,T

2

(2)

daughter1,T

2,5,6

(3)

tblancestorT

tbltable2=1,3=2,4=5,5=1,6=1,7=6,9=5,8=2,10=6

(4)

path9,1,T

FAIL

(5)

See Also

GraphTheory

networks(deprecated)[daughter]

networks(deprecated)[path]

networks(deprecated)[shortpathtree]

with