projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c43ae9e
)
add new method to return positive integers only
author
bdemsky
<bdemsky>
Mon, 29 Jun 2009 10:19:35 +0000
(10:19 +0000)
committer
bdemsky
<bdemsky>
Mon, 29 Jun 2009 10:19:35 +0000
(10:19 +0000)
Robust/src/Benchmarks/SingleTM/common/Random.java
patch
|
blob
|
history
diff --git
a/Robust/src/Benchmarks/SingleTM/common/Random.java
b/Robust/src/Benchmarks/SingleTM/common/Random.java
index ab46bf130d1c0ecc88bdd986a0d76ff7a414dc3e..611592b2bf30ab7978cb1b538401b447c226a0eb 100644
(file)
--- a/
Robust/src/Benchmarks/SingleTM/common/Random.java
+++ b/
Robust/src/Benchmarks/SingleTM/common/Random.java
@@
-52,6
+52,14
@@
public class Random {
return genrand_int32();
}
+ public int posrandom_generate() {
+ int r=genrand_int32();
+ if (r>0)
+ return r;
+ else
+ return -r;
+ }
+
public int genrand_int32() {
int y;
int mti = this.mti;