Given a network and a list of point patterns on this network, create a new network from all the
vertices of the original network plus all the points in the patterns, splitting any edges that
contain such points into several shorter edges. This function keeps track which vertex-indices
represent each of the data point patterns. The returned object contains all the components
needed for a call to kmeansbarynet
.
netsplit(network, pplist)
A list containing the following components:
the new network with all the points added as vertices. Contains also the matrix of shortest-path distances between all these points.
a matrix containing the new vertex-indices of the data point patterns, one column corresponds to one point pattern.
a vector containing the cardinalities of the data point patterns.
the index of the virtual point.
an object of class linnet
or lpp
. In the latter case the domain
component is extracted and any points of the lpp
are ignored.
a list containing (at least) x
- and y
-coordinates of the point patterns,
which will be projected onto the network
Raoul Müller raoul.mueller@uni-goettingen.de
Dominic Schuhmacher schuhmacher@math.uni-goettingen.de
This function relies heavily on code from the package spatstat
to create the
new network and efficiently compute all pairwise shortest-path distances between
the new vertices.
If not all point patterns are of the same size, this function fills up the vertex-indices
of the smaller patterns with a virtual index that is one larger than the maximal
index appearing in the new network. This structure is required for
calling kmeansbarynet
.
kmeansbarynet
# See the example for kmeansbarynet.
Run the code above in your browser using DataLab