diff options
author | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-09 15:00:17 +0000 |
---|---|---|
committer | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-09 15:00:17 +0000 |
commit | 37fb01477f594f130ec235b5d855c63d48358ff4 (patch) | |
tree | 7c2d1f8a4f037ce17bae32c5b2f49e09205c9578 /gi/posterior-regularisation/prjava/src/arr | |
parent | 471b69d38404452e5150d1955d4dc96744cbbeda (diff) |
Parallelised PhraseContextObjective.projectPoint
Added ANT build file
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@193 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/prjava/src/arr')
-rw-r--r-- | gi/posterior-regularisation/prjava/src/arr/F.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gi/posterior-regularisation/prjava/src/arr/F.java b/gi/posterior-regularisation/prjava/src/arr/F.java index c194496e..5821af42 100644 --- a/gi/posterior-regularisation/prjava/src/arr/F.java +++ b/gi/posterior-regularisation/prjava/src/arr/F.java @@ -1,12 +1,16 @@ package arr;
+import java.util.Random;
+
public class F {
+ private static Random rng = new Random(); //(9562724l);
+
public static void randomise(double probs[])
{
double z = 0;
for (int i = 0; i < probs.length; ++i)
{
- probs[i] = 3 + Math.random();
+ probs[i] = 3 + rng.nextDouble();
z += probs[i];
}
|