Package net.sf.doodleproject.numerics4j.exception

Examples of net.sf.doodleproject.numerics4j.exception.ConvergenceException


            state.iterate();
        } while (state.getIterations() < getMaximumIterations()
            && Math.abs(state.getRelativeError()) > getMaximumRelativeError());

        if (state.getIterations() >= getMaximumIterations()) {
            throw new ConvergenceException(
                "Iterative method failed to converge.");
        }
    }
View Full Code Here


            s = sn;
        } while (n < getMaximumIterations()
            && Math.abs(error) > getMaximumRelativeError());

        if (n >= getMaximumIterations()) {
            throw new ConvergenceException("Power series failed to converge.");
        }

        return s;
    }
View Full Code Here

                fa = getFunction().evaluate(a);
                fb = getFunction().evaluate(b);
            } while ((fa * fb > 0.0) && (n < getMaximumIterations()));

            if (n >= getMaximumIterations()) {
                throw new ConvergenceException(
                    "the initial bounds do not bracket a root.");
            }

            ret = new double[] { a, b };
        }
View Full Code Here

            f1 = f;
        } while (n < getMaximumIterations()
            && error > getMaximumRelativeError());

        if (n >= getMaximumIterations()) {
            throw new ConvergenceException("Secant method failed to converge.");
        }

        return x1;
    }
View Full Code Here

            ++n;
        } while (n < getMaximumIterations()
            && error > getMaximumRelativeError());

        if (n >= getMaximumIterations()) {
            throw new ConvergenceException(
                "False position method failed to converge.");
        }

        return x;
    }
View Full Code Here

            sumSimpons = sumSimponsNext;
        } while (state.getIterations() < getMaximumIterations()
            && error > getMaximumRelativeError());

        if (state.getIterations() >= getMaximumIterations()) {
            throw new ConvergenceException(
                "Simpson's integration failed to converge.");
        }

        return sumSimpons;
    }
View Full Code Here

            s = sn;
        } while (state.getIterations() < getMaximumIterations()
            && error > getMaximumRelativeError());

        if (state.getIterations() >= getMaximumIterations()) {
            throw new ConvergenceException(
                "Trapezoidal integration failed to converge.");
        }

        return s;
    }
View Full Code Here

                error = Math.max(Math.abs(fb), Math.abs(b / c - 1.0));
            } while (n < getMaximumIterations()
                && error > getMaximumRelativeError());

            if (n >= getMaximumIterations()) {
                throw new ConvergenceException(
                    "Brent's method failed to converge.");
            }

            ret = b;
        }
View Full Code Here

                int n = level + 1;
                ret = integrate(a, pivot, fa, fc, fd, hn, e, s1, n)
                    + integrate(pivot, b, fc, fb, fe, hn, e, s2, n);
            }
        } else {
            throw new ConvergenceException(
                "Adaptive quadrature failed to converge.");
        }

        return ret;
    }
View Full Code Here

            r1 = new DoubleArray();
        } while (n < getMaximumIterations()
            && error > getMaximumRelativeError());

        if (n >= getMaximumIterations()) {
            throw new ConvergenceException(
                "Romberg integration failed to converge.");
        }

        return r0.get(r0.getSize() - 1);
    }
View Full Code Here

TOP

Related Classes of net.sf.doodleproject.numerics4j.exception.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.