forked from kscience/kmath
Comments fixed.
This commit is contained in:
parent
d5c3aa563e
commit
31be2b547b
@ -61,7 +61,7 @@ public fun DoubleFieldOpsND.dynamicTimeWarping(series1 : DoubleBuffer, series2 :
|
|||||||
val costMatrix = structureND(ShapeND(series1.size, series2.size)) {
|
val costMatrix = structureND(ShapeND(series1.size, series2.size)) {
|
||||||
(row, col) -> abs(series1[row] - series2[col])
|
(row, col) -> abs(series1[row] - series2[col])
|
||||||
}
|
}
|
||||||
// Formula: costMatrix[i, j] = euqlidNorm(series1(i), series2(j)) +
|
// Formula: costMatrix[i, j] = euqlideanNorm(series1(i), series2(j)) +
|
||||||
// min(costMatrix[i - 1, j], costMatrix[i, j - 1], costMatrix[i - 1, j - 1]).
|
// min(costMatrix[i - 1, j], costMatrix[i, j - 1], costMatrix[i - 1, j - 1]).
|
||||||
for ( (row, col) in costMatrix.indices) {
|
for ( (row, col) in costMatrix.indices) {
|
||||||
costMatrix[row, col] += when {
|
costMatrix[row, col] += when {
|
||||||
|
Loading…
Reference in New Issue
Block a user