| /external/apache-commons-math/src/main/java/org/apache/commons/math/ode/events/ |
| EventState.java | 27 import org.apache.commons.math.util.FastMath; 99 this.convergence = FastMath.abs(convergence); 205 if (FastMath.abs(t1 - t0) < convergence) { 211 final int n = FastMath.max(1, (int) FastMath.ceil(FastMath.abs(dt) / maxCheckInterval)); 277 (FastMath.abs(root - ta) <= convergence) && 278 (FastMath.abs(root - previousEventTime) <= convergence)) { 283 (FastMath.abs(previousEventTime - root) > convergence)) { 336 if (pendingEvent && (FastMath.abs(pendingEventTime - t) <= convergence)) [all...] |
| /external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/solvers/ |
| RiddersSolver.java | 23 import org.apache.commons.math.util.FastMath; 198 if (FastMath.abs(y3) <= functionValueAccuracy) { 204 (x3 - x1) / FastMath.sqrt(delta); 209 final double tolerance = FastMath.max(relativeAccuracy * FastMath.abs(x), absoluteAccuracy); 210 if (FastMath.abs(x - oldx) <= tolerance) { 214 if (FastMath.abs(y) <= functionValueAccuracy) {
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/transform/ |
| FastCosineTransformer.java | 24 import org.apache.commons.math.util.FastMath; 103 double scaling_coefficient = FastMath.sqrt(2.0 / (f.length-1)); 129 double scaling_coefficient = FastMath.sqrt(2.0 / (n-1)); 242 final double b = FastMath.sin(i * FastMath.PI / n) * (f[i] - f[n-i]); 243 final double c = FastMath.cos(i * FastMath.PI / n) * (f[i] - f[n-i]);
|
| FastSineTransformer.java | 24 import org.apache.commons.math.util.FastMath; 103 double scaling_coefficient = FastMath.sqrt(2.0 / f.length); 128 double scaling_coefficient = FastMath.sqrt(2.0 / n); 234 final double a = FastMath.sin(i * FastMath.PI / n) * (f[i] + f[n-i]);
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/ode/ |
| MultistepIntegrator.java | 29 import org.apache.commons.math.util.FastMath; 133 setMaxGrowth(FastMath.pow(2.0, -exp)); 172 setMaxGrowth(FastMath.pow(2.0, -exp)); 296 return FastMath.min(maxGrowth, FastMath.max(minReduction, safety * FastMath.pow(error, exp)));
|
| ContinuousOutputModel.java | 29 import org.apache.commons.math.util.FastMath; 154 if (FastMath.abs(gap) > 1.0e-3 * FastMath.abs(step)) { 156 LocalizedFormats.HOLE_BETWEEN_MODELS_TIME_RANGES, FastMath.abs(gap)); 302 if ((FastMath.abs(tMed - tMin) < 1e-6) || (FastMath.abs(tMax - tMed) < 1e-6)) { 319 index = (int) FastMath.rint(iLagrange); 323 final int low = FastMath.max(iMin + 1, (9 * iMin + iMax) / 10); 324 final int high = FastMath.min(iMax - 1, (iMin + 9 * iMax) / 10);
|
| AbstractIntegrator.java | 38 import org.apache.commons.math.util.FastMath; 371 if (FastMath.abs(t - t0) <= 1.0e-12 * FastMath.max(FastMath.abs(t0), FastMath.abs(t))) { 374 FastMath.abs(t - t0)); 403 FastMath.ulp(FastMath.max(FastMath.abs(startTime), FastMath.abs(endTime))) [all...] |
| /external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/fitting/ |
| HarmonicCoefficientsGuesser.java | 22 import org.apache.commons.math.util.FastMath; 243 a = FastMath.sqrt(c1 / c2); 244 omega = FastMath.sqrt(c2 / c3); 268 double cosine = FastMath.cos(omegaX); 269 double sine = FastMath.sin(omegaX); 275 phi = FastMath.atan2(-fsMean, fcMean);
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/distribution/ |
| ZipfDistributionImpl.java | 24 import org.apache.commons.math.util.FastMath; 149 return (1.0 / FastMath.pow(x, exponent)) / generalizedHarmonic(numberOfElements, exponent); 210 value += 1.0 / FastMath.pow(k, m);
|
| BetaDistributionImpl.java | 24 import org.apache.commons.math.util.FastMath; 162 double logX = FastMath.log(x); 163 double log1mX = FastMath.log1p(-x); 164 return FastMath.exp((alpha - 1) * logX + (beta - 1) * log1mX - z);
|
| GammaDistributionImpl.java | 25 import org.apache.commons.math.util.FastMath; 206 return FastMath.pow(x / beta, alpha - 1) / beta * FastMath.exp(-x / beta) / FastMath.exp(Gamma.logGamma(alpha));
|
| HypergeometricDistributionImpl.java | 25 import org.apache.commons.math.util.FastMath; 148 return FastMath.max(0, m - (n - k)); 187 return FastMath.min(k, m); 212 ret = FastMath.exp(p1 + p2 - p3); 229 return FastMath.exp(MathUtils.binomialCoefficientLog(m, x) + 370 return FastMath.max(0, 386 return FastMath.min(getNumberOfSuccesses(), getSampleSize());
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/linear/ |
| QRDecompositionImpl.java | 24 import org.apache.commons.math.util.FastMath; 77 rDiag = new double[FastMath.min(m, n)]; 88 for (int minor = 0; minor < FastMath.min(m, n); minor++) { 104 final double a = (qrtMinor[minor] > 0) ? -FastMath.sqrt(xNormSqr) : FastMath.sqrt(xNormSqr); 159 for (int row = FastMath.min(m, n) - 1; row >= 0; row--) { 196 for (int minor = m - 1; minor >= FastMath.min(m, n); minor--) { 200 for (int minor = FastMath.min(m, n)-1; minor >= 0; minor--){ 234 for (int j = 0; j < FastMath.min(i + 1, n); ++j) { 306 for (int minor = 0; minor < FastMath.min(m, n); minor++) [all...] |
| ArrayRealVector.java | 26 import org.apache.commons.math.util.FastMath; 379 data[i] = FastMath.pow(data[i], d); 388 data[i] = FastMath.exp(data[i]); 397 data[i] = FastMath.expm1(data[i]); 406 data[i] = FastMath.log(data[i]); 415 data[i] = FastMath.log10(data[i]); 424 data[i] = FastMath.log1p(data[i]); 433 data[i] = FastMath.cosh(data[i]); 442 data[i] = FastMath.sinh(data[i]); 451 data[i] = FastMath.tanh(data[i]) [all...] |
| BiDiagonalTransformer.java | 20 import org.apache.commons.math.util.FastMath; 66 final int p = FastMath.min(m, n); 270 final double a = (hK[k] > 0) ? -FastMath.sqrt(xNormSqr) : FastMath.sqrt(xNormSqr); 295 final double b = (hK[k + 1] > 0) ? -FastMath.sqrt(xNormSqr) : FastMath.sqrt(xNormSqr); 334 final double a = (hK[k] > 0) ? -FastMath.sqrt(xNormSqr) : FastMath.sqrt(xNormSqr); 359 final double b = (hKp1[k] > 0) ? -FastMath.sqrt(xNormSqr) : FastMath.sqrt(xNormSqr) [all...] |
| BlockRealMatrix.java | 26 import org.apache.commons.math.util.FastMath; 229 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows); 233 final int qEnd = FastMath.min(qStart + BLOCK_SIZE, columns); 277 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows); 281 final int qEnd = FastMath.min(qStart + BLOCK_SIZE, columns); 337 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows); 339 final int qEnd = FastMath.min(qStart + BLOCK_SIZE, columns); 410 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows); 412 final int qEnd = FastMath.min(qStart + BLOCK_SIZE, columns); 519 final int pEnd = FastMath.min(pStart + BLOCK_SIZE, rows) [all...] |
| /external/apache-commons-math/src/main/java/org/apache/commons/math/ode/nonstiff/ |
| GillStepInterpolator.java | 22 import org.apache.commons.math.util.FastMath; 52 private static final double TWO_MINUS_SQRT_2 = 2 - FastMath.sqrt(2.0); 55 private static final double TWO_PLUS_SQRT_2 = 2 + FastMath.sqrt(2.0);
|
| EmbeddedRungeKuttaIntegrator.java | 26 import org.apache.commons.math.util.FastMath; 250 scale[i] = scalAbsoluteTolerance + scalRelativeTolerance * FastMath.abs(y[i]); 254 scale[i] = vecAbsoluteTolerance[i] + vecRelativeTolerance[i] * FastMath.abs(y[i]); 293 FastMath.min(maxGrowth, 294 FastMath.max(minReduction, safety * FastMath.pow(error, exp))); 318 FastMath.min(maxGrowth, FastMath.max(minReduction, safety * FastMath.pow(error, exp)));
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/stat/descriptive/moment/ |
| GeometricMean.java | 26 import org.apache.commons.math.util.FastMath; 110 return FastMath.exp(sumOfLogs.getResult() / sumOfLogs.getN()); 143 return FastMath.exp(
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/integration/ |
| TrapezoidIntegrator.java | 24 import org.apache.commons.math.util.FastMath; 118 final double delta = FastMath.abs(t - oldt); 120 relativeAccuracy * (FastMath.abs(oldt) + FastMath.abs(t)) * 0.5;
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/random/ |
| RandomDataImpl.java | 45 import org.apache.commons.math.util.FastMath; 366 double p = FastMath.exp(-mean); 382 final double lambda = FastMath.floor(mean); 384 final double logLambda = FastMath.log(lambda); 387 final double delta = FastMath.sqrt(lambda * FastMath.log(32 * lambda / FastMath.PI + 1)); 390 final double a1 = FastMath.sqrt(FastMath.PI * twolpd) * FastMath.exp(1 / 8 * lambda) [all...] |
| /external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/polynomials/ |
| PolynomialFunction.java | 26 import org.apache.commons.math.util.FastMath; 144 final int lowLength = FastMath.min(coefficients.length, p.coefficients.length); 145 final int highLength = FastMath.max(coefficients.length, p.coefficients.length); 170 int lowLength = FastMath.min(coefficients.length, p.coefficients.length); 171 int highLength = FastMath.max(coefficients.length, p.coefficients.length); 214 for (int j = FastMath.max(0, i + 1 - p.coefficients.length); 215 j < FastMath.min(coefficients.length, i + 1); 309 double absAi = FastMath.abs(coefficients[i]);
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/ode/sampling/ |
| StepNormalizer.java | 21 import org.apache.commons.math.util.FastMath; 76 this.h = FastMath.abs(h);
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/estimation/ |
| AbstractEstimator.java | 27 import org.apache.commons.math.util.FastMath; 132 double factor = -FastMath.sqrt(wm.getWeight()); 164 residuals[i] = FastMath.sqrt(wm.getWeight()) * residual; 167 cost = FastMath.sqrt(cost); 189 return FastMath.sqrt(criterion / wm.length); 266 final double c = FastMath.sqrt(getChiSquare(problem) / (m - p)); 269 errors[i] = FastMath.sqrt(covar[i][i]) * c;
|
| /external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/general/ |
| AbstractLeastSquaresOptimizer.java | 35 import org.apache.commons.math.util.FastMath; 199 double wi = FastMath.sqrt(residualsWeights[i]); 230 wresiduals[i]= residual*FastMath.sqrt(residualsWeights[i]); 234 cost = FastMath.sqrt(cost); 249 return FastMath.sqrt(getChiSquare() / rows); 317 final double c = FastMath.sqrt(getChiSquare() / (rows - cols)); 320 errors[i] = FastMath.sqrt(covar[i][i]) * c;
|