path4gn: reduces the graph to the portion in between two node sets

Description Usage Arguments Details Value Examples

View source: R/f0.g4n1.code.r

Description

Just removing from the graph those arcs (and nodes) which does not belong to a path going from a node to another one.
As graph comprising cycles can be introduced, both directions can be considered.

Usage

1
path4gn(gn, n1, n2, quel=1, elono=TRUE)

Arguments

gn

The object gn to consider.

n1

First node set to consider

n2

Second node set to consider

quel

(=1) which directions to consider ? 1 for n1 to n2; 2 for n2 to n1 and 3 for both directions

elono

(=TRUE) are eliminated other nodes ?

Details

To get all descendants of n1, it suffices to put n2 as the complete set of nodes

Value

The reduced object gn. Notice that if a node belongs to n1 (n2) but is not linked to any node of n2 (n1) it will be eliminated if elono is TRUE.

Examples

1
2
3
 g4n3k("RESET"); # needed only for R checking, to be forgotten
 path4gn(g4n.gn7, "E", "J", 3, FALSE);
 plot(path4gn(g4n.gn7, "A", LETTERS[1:10], 3, FALSE));

g4n documentation built on May 2, 2019, 5:47 p.m.

Related to path4gn in g4n...