module Clumpiness
( getClumpiness
) where
import Data.Tree (Tree)
import Math.Clumpiness.Algorithms (generateClumpMap)
import Math.Clumpiness.Types (ClumpList)
import TreeTransform
import Types
getClumpiness :: Exclusivity
-> Bool
-> Bool
-> Tree NodeLabel
-> ClumpList Label
getClumpiness exclusivity predefinedIDs excludeInner tree =
generateClumpMap (const True) propertyMap superTree
where
superTree = convertToSuperTree
. filterExclusiveTree exclusivity
. (\ x -> if excludeInner
then x
else innerToLeaves x
)
. (\ x -> if predefinedIDs
then x
else addUniqueNodeIDs x
)
$ tree
propertyMap = getPropertyMap superTree