summaryrefslogtreecommitdiff
path: root/gi/posterior-regularisation/prjava/src/optimization/projections
diff options
context:
space:
mode:
authortrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 18:22:59 +0000
committertrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 18:22:59 +0000
commite0265b2c2be3173341bdc2ffacdb6847b30890f5 (patch)
treef3fbb1d3ed534ca9cab8001f0c19527cd2dd861b /gi/posterior-regularisation/prjava/src/optimization/projections
parent2eeaa2eb91334bea11d70db1011f1a28ce3bb7d2 (diff)
Cleaning up the PC model.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@236 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/prjava/src/optimization/projections')
-rw-r--r--gi/posterior-regularisation/prjava/src/optimization/projections/SimplexProjection.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/posterior-regularisation/prjava/src/optimization/projections/SimplexProjection.java b/gi/posterior-regularisation/prjava/src/optimization/projections/SimplexProjection.java
index eec11bcf..f22afcaf 100644
--- a/gi/posterior-regularisation/prjava/src/optimization/projections/SimplexProjection.java
+++ b/gi/posterior-regularisation/prjava/src/optimization/projections/SimplexProjection.java
@@ -40,7 +40,7 @@ public class SimplexProjection extends Projection{
for (int i = 0; i < ds.length; i++) {
currentSum+=ds[i];
theta = (currentSum-scale)/(i+1);
- if(ds[i]-theta <= 0){
+ if(ds[i]-theta < -1e-10){
break;
}
previousTheta = theta;