From 3a7d95b3bc27ea07a57f21f26db4e136f5244284 Mon Sep 17 00:00:00 2001 From: "trevor.cohn" Date: Tue, 13 Jul 2010 18:22:59 +0000 Subject: Cleaning up the PC model. git-svn-id: https://ws10smt.googlecode.com/svn/trunk@236 ec762483-ff6d-05da-a07a-a48fb63a330f --- .../prjava/src/optimization/projections/SimplexProjection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gi/posterior-regularisation/prjava/src/optimization/projections/SimplexProjection.java') 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; -- cgit v1.2.3