Commit 2752c615 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel
Browse files

Implement update for Powerset

parent ed142ea2
......@@ -43,6 +43,18 @@ instance RefinementInterface Powerset where
init :: Powerset -> H1 Powerset -> [Label Powerset] -> Weight Powerset
init _ _ = (0, ) . length
update :: Powerset -> [Label Powerset] -> Weight Powerset
-> (Weight Powerset, H3 Powerset, Weight Powerset)
update _ labels (toRest, toC) =
let
toS = length labels
toCwithoutS = toC - toS
weightToS = (toRest + toCwithoutS, toS)
h3 = (toRest > 0, toCwithoutS > 0, toS > 0)
weightToCwithoutS = (toRest + toS, toCwithoutS)
in
(weightToS, h3, weightToCwithoutS)
powerset :: RefinableFunctor
powerset = RefinableFunctor
{ name = "Powerset"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment