Package org.apache.commons.math

Examples of org.apache.commons.math.ConvergenceException


                } else if (b != 0) {
                    p2 = (a / b * p1) + p0;
                    q2 = (a / b * q1) + q0;
                } else {
                    // can not scale an convergent is unbounded.
                    throw new ConvergenceException(
                        "Continued fraction convergents diverged to +/- infinity for value {0}",
                        new Object[] { new Double(x) });
                }
            }
            double r = p2 / q2;
View Full Code Here


            numIterations++ ;
        } while ((fa * fb > 0.0) && (numIterations < maximumIterations) &&
                ((a > lowerBound) || (b < upperBound)));
  
        if (fa * fb >= 0.0 ) {
            throw new ConvergenceException
            ("Number of iterations={0}, maximum iterations={1}, initial={2}, lower bound={3}, upper bound={4}, final a value={5}, final b value={6}, f(a)={7}, f(b)={8}",
             new Object[] { new Integer(numIterations), new Integer(maximumIterations),
                            new Double(initial), new Double(lowerBound), new Double(upperBound),
                            new Double(a), new Double(b), new Double(fa), new Double(fb) });
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.math.ConvergenceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.