public ClSimplexSolver SetEditedValue(ClVariable v, double n) /* throws ExClInternalError */ { if (!ContainsVariable(v)) { v.ChangeValue(n); return this; } if (!Cl.Approx(n, v.Value)) { AddEditVar(v); BeginEdit(); try { SuggestValue(v, n); } catch(ExClError) { // just added it above, so we shouldn't get an error throw new ExClInternalError("Error in SetEditedValue"); } EndEdit(); } return this; }