Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
i7
peregrine
Commits
76fa0232
Commit
76fa0232
authored
Aug 06, 2018
by
Philipp Meyer
Browse files
Use modulos operation in remainder protocol
parent
e6106f86
Changes
1
Hide whitespace changes
Inline
Side-by-side
benchmarks/pp-print/src/PopulationProtocol.hs
View file @
76fa0232
...
...
@@ -279,9 +279,9 @@ createModuloProtocol n c = PopulationProtocol { states = [Mod i | i <- [0..(n-1)
modOpinion
(
Mod
a
)
=
a
==
c
modOpinion
(
ModPassive
b
)
=
b
modPredicate
=
"
EXISTS k :
"
++
modPredicate
=
"
(
"
++
(
intercalate
" + "
[
show
i
++
" * "
++
toVar
(
Mod
i
)
|
i
<-
[
0
..
(
n
-
1
)]
])
++
"
=
"
++
show
c
++
"
+
"
++
show
n
++
" * k"
"
) %
"
++
show
n
++
"
=
"
++
show
c
createMajorityProtocol
::
MajorityProtocol
...
...
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