Class of Point Matchings
"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
pp1, pp2 the two point patterns to be matched (vertices)
matrix a matrix specifying which points are matched
and with what weights (edges)
type (optional) a character string for the type of
the matching (one of
cutoff (optional) cutoff value for interpoint distances
q (optional) the order for taking averages of
distance (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,\infty]$ 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.
# 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 plot(m) # an optimal complete unweighted matching m2 <- pppdist(X,Y) summary(m2) m2$matrix plot(m2)