Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Informatik 8
CoPaR
Commits
2752c615
Commit
2752c615
authored
May 30, 2018
by
Hans-Peter Deifel
Browse files
Implement update for Powerset
parent
ed142ea2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Data/Functors/Powerset.hs
View file @
2752c615
...
...
@@ -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"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment