connected: Determine whether two nodes are connected.

View source: R/connected.R

connectedR Documentation

Determine whether two nodes are connected.

Description

Determines whether two nodes in the planar graph describing the mapping between two adjacent node-node mappings. That is, given a two correspondences between a nodes on two paths, it determines whether there is a legal transition between them. This can be seen as two elements of the mapping matrix, each specified by a row and column.

Usage

 connected(r1, c1, r2, c2) 

Arguments

r1

row of first node

c1

column of first node

r2

row of second node

c2

column of second node.

Details

r1,c1 should specify a node to the left/above r2,c2. The outcome depends on whether r,c is a node or segment on the path. Point-point mappings can transition to the next point-segment mappings, or the next point-point segment.

Value

returns T or F

Note

The outcome of this does not depend on the actual paths–it is simply a logical computation based on transitions between points and segments.

Author(s)

Shane T. Mueller and Brandon Perelman

References

See Mueller et al., 2016 https://sites.google.com/a/mtu.edu/mapping/

Examples

connected(3,5,2,4)
connected(3,3,1,1)

stmueller/pathmapping documentation built on Nov. 13, 2023, 12:39 p.m.