diff --git a/src/Data/RandomWalkSimilarity.hs b/src/Data/RandomWalkSimilarity.hs index ffed24357..2a28a6875 100644 --- a/src/Data/RandomWalkSimilarity.hs +++ b/src/Data/RandomWalkSimilarity.hs @@ -44,6 +44,9 @@ rws compare getLabel as bs pure [ (i, compared) ] deleteRemaining diffs unmapped = foldl' (flip (List.insertBy (comparing fst))) (join diffs) ((,) (negate 1) . delete . snd . snd <$> unmapped) +data UnmappedTerm leaf annotation = UnmappedTerm { index :: {-# UNPACK #-} !Int, feature :: !(Vector.Vector Double), term :: !(Term leaf annotation) } + deriving Eq + longestIncreasingSubsequence :: Ord a => [a] -> [a] longestIncreasingSubsequence = longestOrderedSubsequenceBy (<)