EstimateSpec implements Cloneable, InformationSetSerializable { public void setTol(double value) { if (value <= 0 || value > 1e-2) { throw new TramoException("Invalid Tol parameter"); } tol_ = value; } EstimateSpec(); static void fillDictionary(String prefix, Map<String, Class> dic); void reset(); TsPeriodSelector getSpan(); void setSpan(TsPeriodSelector span); boolean isEML(); void setEML(boolean value); double getTol(); void setTol(double value); double getUbp(); void setUbp(double value); boolean isDefault(); @Override EstimateSpec clone(); @Override int hashCode(); @Override boolean equals(Object obj); @Override InformationSet write(boolean verbose); @Override boolean read(InformationSet info); static final String SPAN; static final double DEF_TOL; }
@Test(expected = TramoException.class) public void testSetTolUpperBound() { EstimateSpec spec = new EstimateSpec(); spec.setTol(1.0); }
@Test(expected = TramoException.class) public void testSetTolLowerBound() { EstimateSpec spec = new EstimateSpec(); spec.setTol(-0.1); }