"pppmatching" to represent a matching of two planar
Optionally includes information about the construction of the matching
and its associated distance between the point patterns.
This class represents a (possibly weighted and incomplete) matching
between two planar point patterns (objects of class
A matching can be thought of as a bipartite weighted graph where the vertices are given by the two point patterns and edges of positive weights are drawn each time a point of the first point pattern is "matched" with a point of the second point pattern.
m is an object of type
pppmatching, it contains the
||the two point patterns to be matched (vertices)|
||a matrix specifying which points are matched|
|and with what weights (edges)|
||(optional) a character string for the type of|
| the matching (one of
||(optional) cutoff value for interpoint distances|
||(optional) the order for taking averages of|
||(optional) the distance associated with the matching|
matrix is a "generalized adjacency matrix".
The numbers of rows
and columns match the cardinalities of the first and second point
patterns, respectively. The
[i,j]-th entry is positive if
i-th point of
X and the
j-th point of
Y are matched (zero otherwise) and its value then gives
the corresponding weight of the match. For an unweighted matching
all the weights are set to 1.
The optional elements are for saving details about matchings in the context of
optimal point matching techniques.
type can be one of
"ace" (for "assignment only if
cardinalities differ") or
"mat" (for "mass transfer").
is a positive numerical value that specifies the maximal interpoint distance and
q is a value in [1,Inf] that gives the order of the average
applied to the interpoint distances. See the help files for
matchingdist for detailed information about these elements.
Objects of class
"pppmatching" may be created by the function
pppmatching, and are most commonly obtained as output of the
pppdist. There are methods
summary for this class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# a random complete unweighted matching X <- runifpoint(10) Y <- runifpoint(10) am <- r2dtable(1, rep(1,10), rep(1,10))[] # generates a random permutation matrix m <- pppmatching(X, Y, am) summary(m) m$matrix ## Not run: plot(m) ## End(Not run) # an optimal complete unweighted matching m2 <- pppdist(X,Y) summary(m2) m2$matrix ## Not run: plot(m2) ## End(Not run)