From abed919fa57f3e96f9dcbcbcdcad428549590c3b Mon Sep 17 00:00:00 2001 From: JosephBond Date: Mon, 2 Oct 2023 15:16:22 +0100 Subject: [PATCH] Cost-matrix almost right, but not quite, fails due to forced test failure --- fluid/example/dtw/cost-matrix.fld | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluid/example/dtw/cost-matrix.fld b/fluid/example/dtw/cost-matrix.fld index 703eea13f..d1c0d6303 100644 --- a/fluid/example/dtw/cost-matrix.fld +++ b/fluid/example/dtw/cost-matrix.fld @@ -1,9 +1,9 @@ let abs x y = if x - y < 0 then negate (x - y) else (x - y); - costMatrixInit rows cols window = let ns = [0 .. rows]; ms = [0 .. cols] in - [| let initV = if ((abs n m )<= window) then FNum (abs n m) else Infty in initV | (n, m) in (rows, cols) |] + [| let initV = if ((abs n m )<= window) then FNum 0 else Infty + in initV | (n, m) in (rows, cols) |] in costMatrixInit 3 4 1