This class is a convenience to create custom visitors without defining all methods. This class provides default implementations that do nothing.
202203204205206207208209210211212
@Override public double inverseCumulativeProbability(double p) throws OutOfRangeException { double ret; if (p < 0.0 || p > 1.0) { throw new OutOfRangeException(p, 0.0, 1.0); } else if (p == 1.0) { ret = Double.POSITIVE_INFINITY; } else { ret = -mean * FastMath.log(1.0 - p); }
4849505152535455565758
if (lo >= hi) { throw new NumberIsTooLargeException(lo, hi, false); } if (init < lo || init > hi) { throw new OutOfRangeException(init, lo, hi); } lower = lo; upper = hi; start = init;
257258259260261262263264265266267
@Override public double inverseCumulativeProbability(double p) throws OutOfRangeException { if (p < 0 || p > 1) { throw new OutOfRangeException(p, 0, 1); } if (p == 0) { return a; } if (p == 1) {
201202203204205206207
/** * {@inheritDoc} * @throws TooManyEvaluationsException. */ public void trigger(int max) { throw new TooManyEvaluationsException(max); }
306307308309310311312313
protected void incrementEvaluationCount() throws TooManyEvaluationsException { try { evaluations.incrementCount(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } }
216217218219220221222
/** * {@inheritDoc} * @throws TooManyIterationsException. */ public void trigger(int max) { throw new TooManyIterationsException(max); }
454647484950515253
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); }
419420421422423424425426427428429430431
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; } }
440441442443444445446447448449
*/ 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; }
227228229230231232233234235236237
// build the P matrix elements from Taylor series formulas final BigFraction[] pI = pData[i]; final int factor = -(i + 1); int aj = factor; for (int j = 0; j < pI.length; ++j) { pI[j] = new BigFraction(aj * (j + 2)); aj *= factor; } } return new Array2DRowFieldMatrix<BigFraction>(pData, false);