Module: DTW::Metrics
- Defined in:
- lib/dtwrb/metrics.rb,
sig/dtwrb.rbs
Defined Under Namespace
Modules: Chebyshev, Cosine, Euclidean, Manhattan
Constant Summary collapse
- REGISTRY =
{ euclidean: Euclidean, manhattan: Manhattan, chebyshev: Chebyshev, cosine: Cosine }.freeze
- DEFAULT =
Euclidean
Class Method Summary collapse
Class Method Details
.assert_conformable!(left, right) ⇒ void
This method returns an undefined value.
7 8 9 10 11 12 13 14 |
# File 'lib/dtwrb/metrics.rb', line 7 def assert_conformable!(left, right) return if left.length == right.length raise( DimensionMismatchError, "local distance requires equal dimensions, got #{left.length} and #{right.length}" ) end |