Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

countPaths

Count the number of warping paths consistent with the constraints.


Description

Count how many possible warping paths exist in the alignment problem passed as an argument. The object passed as an argument is used to look up the problem parameters such as the used step pattern, windowing, open ends, and so on. The actual alignment is ignored.

Usage

countPaths(d, debug = FALSE)

Arguments

d

an object of class dtw

debug

return an intermediate result

Details

Note that the number of paths grows exponentially with problems size. The result may be approximate when windowing functions are used.

If debug=TRUE, a matrix used for the computation is returned instead of the final result.

Value

The number of paths.

Author(s)

Toni Giorgino

Examples

ds<-dtw(1:7+2,1:8,keep=TRUE,step=asymmetric);
  countPaths(ds)
  ## Result: 126

dtw

Dynamic Time Warping Algorithms

v1.22-3
GPL (>= 2)
Authors
Toni Giorgino [aut, cre]
Initial release
2020-9-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.