These functions, and user-defined equivalents to be passed to the
window.type
argument in dtw
, take two integer
arguments and return a boolean value stating if the coordinates fall
within the allowed window for warping paths.
User-defined functions can read variables template.size
,
query.size
and window.size
; these are forwarded by
dtw
. User-defined functions are free to implement any window
shape, as long as at least one path is allowed between the initial and
final alignment points, i.e., they are compatible with the DTW
constraints. Windowing in the rectangular case is supported as a package-specific
extension (see note). If the cost matrix is non-square, the
built-in window types sakoeChibaWindow
and
itakuraWindow
are automatically adjusted (see note). The
Sakoe-Chiba band, in particular, is centered about the (jagged) line
which joins element [1,1]
to element [n,m]
, and will be
window.size
columns wide.