Examples of ExceptionContext


Examples of org.apache.commons.math3.exception.util.ExceptionContext

     */
    public MathIllegalStateException(Throwable cause,
                                     Localizable pattern,
                                     Object ... args) {
        super(cause);
        context = new ExceptionContext(this);
        context.addMessage(pattern, args);
    }
View Full Code Here

Examples of org.apache.commons.math3.exception.util.ExceptionContext

     * the error.
     * @param args Arguments.
     */
    public MathUnsupportedOperationException(Localizable pattern,
                                             Object ... args) {
        context = new ExceptionContext(this);
        context.addMessage(pattern, args);
    }
View Full Code Here

Examples of org.apache.commons.math3.exception.util.ExceptionContext

                                              double threshold) {
        super(wrong, threshold, false);
        this.index = index;
        this.threshold = threshold;

        final ExceptionContext context = getContext();
        context.addMessage(LocalizedFormats.NOT_POSITIVE_DEFINITE_MATRIX);
        context.addMessage(LocalizedFormats.ARRAY_ELEMENT, wrong, index);
    }
View Full Code Here

Examples of org.apache.commons.math3.exception.util.ExceptionContext

        final double t = x.dotProduct(z);
        final double epsa = (s + MACH_PREC) * CBRT_MACH_PREC;
        if (FastMath.abs(s - t) > epsa) {
            final NonSelfAdjointOperatorException e;
            e = new NonSelfAdjointOperatorException();
            final ExceptionContext context = e.getContext();
            context.setValue(OPERATOR, l);
            context.setValue(VECTOR1, x);
            context.setValue(VECTOR2, y);
            context.setValue(THRESHOLD, Double.valueOf(epsa));
            throw e;
        }
    }
View Full Code Here

Examples of org.apache.commons.math3.exception.util.ExceptionContext

     */
    private static void throwNPDLOException(final RealLinearOperator l,
        final RealVector v) throws NonPositiveDefiniteOperatorException {
        final NonPositiveDefiniteOperatorException e;
        e = new NonPositiveDefiniteOperatorException();
        final ExceptionContext context = e.getContext();
        context.setValue(OPERATOR, l);
        context.setValue(VECTOR, v);
        throw e;
    }
View Full Code Here

Examples of org.apache.commons.math3.exception.util.ExceptionContext

            }
            final double rhoNext = r.dotProduct(z);
            if (check && (rhoNext <= 0.)) {
                final NonPositiveDefiniteOperatorException e;
                e = new NonPositiveDefiniteOperatorException();
                final ExceptionContext context = e.getContext();
                context.setValue(OPERATOR, minv);
                context.setValue(VECTOR, r);
                throw e;
            }
            if (manager.getIterations() == 2) {
                p.setSubVector(0, z);
            } else {
                p.combineToSelf(rhoNext / rhoPrev, 1., z);
            }
            q = a.operate(p);
            final double pq = p.dotProduct(q);
            if (check && (pq <= 0.)) {
                final NonPositiveDefiniteOperatorException e;
                e = new NonPositiveDefiniteOperatorException();
                final ExceptionContext context = e.getContext();
                context.setValue(OPERATOR, a);
                context.setValue(VECTOR, p);
                throw e;
            }
            final double alpha = rhoNext / pq;
            x.combineToSelf(1., alpha, p);
            r.combineToSelf(1., -alpha, q);
View Full Code Here

Examples of org.apache.commons.math3.exception.util.ExceptionContext

            final double t = x.dotProduct(z);
            final double epsa = (s + MACH_PREC) * CBRT_MACH_PREC;
            if (FastMath.abs(s - t) > epsa) {
                final NonSelfAdjointOperatorException e;
                e = new NonSelfAdjointOperatorException();
                final ExceptionContext context = e.getContext();
                context.setValue(SymmLQ.OPERATOR, l);
                context.setValue(SymmLQ.VECTOR1, x);
                context.setValue(SymmLQ.VECTOR2, y);
                context.setValue(SymmLQ.THRESHOLD, Double.valueOf(epsa));
                throw e;
            }
        }
View Full Code Here

Examples of org.apache.commons.math3.exception.util.ExceptionContext

         */
        private static void throwNPDLOException(final RealLinearOperator l,
            final RealVector v) throws NonPositiveDefiniteOperatorException {
            final NonPositiveDefiniteOperatorException e;
            e = new NonPositiveDefiniteOperatorException();
            final ExceptionContext context = e.getContext();
            context.setValue(OPERATOR, l);
            context.setValue(VECTOR, v);
            throw e;
        }
View Full Code Here

Examples of org.apache.commons.math3.exception.util.ExceptionContext

            }
            final double rhoNext = r.dotProduct(z);
            if (check && (rhoNext <= 0.)) {
                final NonPositiveDefiniteOperatorException e;
                e = new NonPositiveDefiniteOperatorException();
                final ExceptionContext context = e.getContext();
                context.setValue(OPERATOR, m);
                context.setValue(VECTOR, r);
                throw e;
            }
            if (manager.getIterations() == 2) {
                p.setSubVector(0, z);
            } else {
                p.combineToSelf(rhoNext / rhoPrev, 1., z);
            }
            q = a.operate(p);
            final double pq = p.dotProduct(q);
            if (check && (pq <= 0.)) {
                final NonPositiveDefiniteOperatorException e;
                e = new NonPositiveDefiniteOperatorException();
                final ExceptionContext context = e.getContext();
                context.setValue(OPERATOR, a);
                context.setValue(VECTOR, p);
                throw e;
            }
            final double alpha = rhoNext / pq;
            x.combineToSelf(1., alpha, p);
            r.combineToSelf(1., -alpha, q);
View Full Code Here

Examples of org.apache.commons.math3.exception.util.ExceptionContext

            }
            final double rhoNext = r.dotProduct(z);
            if (check && (rhoNext <= 0.)) {
                final NonPositiveDefiniteOperatorException e;
                e = new NonPositiveDefiniteOperatorException();
                final ExceptionContext context = e.getContext();
                context.setValue(OPERATOR, m);
                context.setValue(VECTOR, r);
                throw e;
            }
            if (manager.getIterations() == 2) {
                p.setSubVector(0, z);
            } else {
                p.combineToSelf(rhoNext / rhoPrev, 1., z);
            }
            q = a.operate(p);
            final double pq = p.dotProduct(q);
            if (check && (pq <= 0.)) {
                final NonPositiveDefiniteOperatorException e;
                e = new NonPositiveDefiniteOperatorException();
                final ExceptionContext context = e.getContext();
                context.setValue(OPERATOR, a);
                context.setValue(VECTOR, p);
                throw e;
            }
            final double alpha = rhoNext / pq;
            x.combineToSelf(1., alpha, p);
            r.combineToSelf(1., -alpha, q);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.