-- error "can only calculate compare filters on equivelant structures"

filterDiff :: Filter -> Filter -> Double
filterDiff f1 f2 = let
   nodeDiff n1 n2 = sum $ (zipWith (\p1 p2 -> abs (snd p1 - snd p2)) (getParams $ nodeContent n1) (getParams $ nodeContent n2))
   diffTree = liftA2 nodeDiff f1 f2
 in 
  checkStructureThen f1 f2 0 $ sum diffTree
filterDiff :: Filter -> Filter -> Double
filterDiff f1 f2 = let
   nodeDiff n1 n2 = sum $ (zipWith (\p1 p2 -> abs (snd p1 - snd p2)) (getParams $ nodeContent n1) (getParams $ nodeContent n2))
   diffTree = liftA2 nodeDiff f1 f2
 in 
  checkStructureThen f1 f2 0 $ sum diffTree
filterDiff f1 f2 = let
   nodeDiff n1 n2 = sum $ (zipWith (\p1 p2 -> abs (snd p1 - snd p2)) (getParams $ nodeContent n1) (getParams $ nodeContent n2))
   diffTree = liftA2 nodeDiff f1 f2
 in 
  checkStructureThen f1 f2 0 $ sum diffTree