test.crossing.psp | R Documentation |
Determine whether there is a crossing (intersection) between each pair of line segments.
test.crossing.psp(A, B)
test.selfcrossing.psp(A)
A , B |
Line segment patterns (objects of class |
These functions decide whether the given line segments intersect each other.
If A
and B
are two spatial patterns of line segments,
test.crossing.psp(A, B)
returns a logical matrix in which the entry on row i
, column
j
is equal to TRUE
if segment A[i]
has an intersection with segment B[j]
.
If A
is a pattern of line segments, test.selfcross.psp(A)
returns a symmetric logical matrix in which the entry on row i
, column
j
is equal to TRUE
if segment A[i]
has an intersection with segment A[j]
.
A logical matrix.
.
psp
B <- edges(letterR)
if(require(spatstat.random)) {
A <- rpoisline(5, Frame(B))
} else {
FB <- Frame(B)
A <- as.psp(from=runifrect(5, FB), to=runifrect(5, FB))
}
MA <- test.selfcrossing.psp(A)
MAB <- test.crossing.psp(A, B)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.