| threads | R Documentation |
Given a linear network, find the threads. A thread is a set of connected edges which do not pass through any forks in the network.
threads(X, what = c("tessellation", "labels"))
X |
A linear network (object of class |
what |
String (partially matched) specifying the kind of result. |
A ‘thread’ in a network is a subset of the edges of the network which does not pass through any forks in the network.
Given a linear network X,
this function identifies the threads in X and assigns a label to each
edge (segment) of the network indicating which thread it belongs to.
Formally a thread is a set of edges joining successive
vertices v_1, \ldots, v_n of the network
such that
there is an edge of the network joining
v_i and v_{i+1} for each i
each of the intermediate vertices
vertices v_2, \ldots, v_{n-1}
has degree 2 (i.e. there are exactly 2 edges of the network which
end at the vertex)
the terminal vertices v_1 and v_n
do not have degree 2, unless they are the same vertex.
Every edge (segment) of the network belomgs to a unique thread.
This algorithm assigns a label to each edge indicating which thread
it belongs to. If what="labels" (the default), the result is a
factor of length equal to nsegments(X) giving the
classification of segments.
If what="tessellation", the result is a tessellation of
X (object of class "lintess") in which the tiles of the
tessellation are the threads.
A factor, or a tessellation on the network (object of class "lintess").
connected.linnet
A <- edges(letterR)
B <- edges(disc(npoly=16, centre=centroid.owin(letterR)))
L <- as.linnet(superimpose(A,B))
plot(threads(L),
col=rainbow, scramble.cols=TRUE,
lwd=2, show.window=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.