PathOverlap(mapping)
mapping
is the output of CreateMap()
.
PathOverlap
works with a basic mapping and computes 'minimal' mappings,
both left-biased and right-biased, to arrive at two best mappings (those
involving the least distance between corresponding points). These will
typically be identical, but there are non-degenerate cases where they
can differ. Once this mapping is arrived at, the algorithm identifies the core of
the mapping--the central segment of both paths that are mapped onto
the core of the other path, by identifying the segments of each path
(on both ends) that are mapped onto the endpoint of the other path. For
each path, the length of its core is subtracted from the total length of
the path, and these two values are averaged together for the returned
proportion value. The result of this can be used to weigh distance between paths in terms
of overall path similarity. A reasonable measure of path similarity
might be the (area between paths) / (average length of two paths) /
overlap, so that two paths with low overlap get their total distance
inflated by that proportion.