Skip to content
Snippets Groups Projects
Commit b336fcbd authored by Kevin Kappelmann's avatar Kevin Kappelmann
Browse files

feat(ML_Unification/priorities) add doubling of prios

parent a66e8d92
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@
val between : prio * prio -> prio
val halve : prio -> prio
val double : prio -> prio
val inc : prio -> prio
val dec : prio -> prio
......@@ -51,6 +52,7 @@
fun between (p1, p2) = Prio ((dest_prio p1 + dest_prio p2) / two_rat)
fun halve p = between (BOTTOM_EXCLUSIVE, p)
fun double p = Prio (dest_prio p * two_rat) (*assumption: BOTTOM_EXCLUSIVE = 0*)
val epsilon = Rat.make (1, 100)
fun inc p = Prio (dest_prio p + epsilon)
......@@ -78,4 +80,4 @@
>> prio_from_code)
end
end
\ No newline at end of file
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment