aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/cluster.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/cluster.hs b/bin/cluster.hs
index 8d1745d..4d67541 100644
--- a/bin/cluster.hs
+++ b/bin/cluster.hs
@@ -92,9 +92,9 @@ drawGraph path ps cl = writeFile path $ "digraph{" <> edges <> "}"
fmtDbl = show . (/ 10) . fromIntegral . round . (* 1000)
ps' = transpose $ map norm ps
- -- Normalise to purity of first node
+ -- Normalise to frequency of parent
norm :: [Double] -> [Double]
- norm (x : xs) = x : map (/ x) xs
+ norm xxs@(x : xs) = x : zipWith (\i y -> y / xxs !! parent i) [1..] xs
-- Command line args
data Options = Options