diff align/DTW.h @ 771:1d6cca5a5621 pitch-align

Allow use of proper sparse models (i.e. retaining event time info) in alignment; use this to switch to note alignment, which is what we have most recently been doing in the external program. Not currently producing correct results, though
author Chris Cannam
date Fri, 29 May 2020 17:39:02 +0100
parents f32df46d0c84
children 8280f7a363d1
line wrap: on
line diff
--- a/align/DTW.h	Thu May 28 17:52:19 2020 +0100
+++ b/align/DTW.h	Fri May 29 17:39:02 2020 +0100
@@ -189,4 +189,11 @@
     }
 };
 
+inline std::ostream &operator<<(std::ostream &s, const RiseFallDTW::Value v) {
+    return (s <<
+            (v.direction == RiseFallDTW::Direction::None ? "=" :
+             v.direction == RiseFallDTW::Direction::Up ? "+" : "-")
+            << v.distance);
+}
+
 #endif