Examples of pow()


Examples of com.exigen.ie.constrainer.IntExp.pow()

  /**
   * @return this in power of value where value >= 0
   */
  public javax.constraints.Var power(int value) {
    IntExp myVar = (IntExp) getImpl();
    return new Var(getProblem(),myVar.pow(value));
  }
 
//  /**
//   * Returns a number of constraints that constrain this variable
//   * @return integer or -1 if unknown
View Full Code Here

Examples of com.mockturtlesolutions.snifflib.datatypes.DblMatrix.pow()

    concMatrix.show("concMatrix");
    this.BVector.show("BVector");
   
   
    DblMatrix ionicStrPenalty = iStrength.minus(this.desiredIonicStr);
    ionicStrPenalty = ionicStrPenalty.pow(2);
   
    DblMatrix resids = (this.AMatrix.dot(concMatrix)).minus(this.BVector);
    DblMatrix ONE = new DblMatrix(1.0);
   
    resids = resids.getMap(ONE.minus(DblMatrix.isNaN(resids)));
View Full Code Here

Examples of de.jungblut.math.DoubleVector.pow()

        Iterator<DoubleVectorElement> featureIterator = feature
            .iterateNonZero();
        while (featureIterator.hasNext()) {
          DoubleVectorElement next = featureIterator.next();
          DoubleVector rowVector = theta.getRowVector(next.getIndex());
          double l2 = rowVector.pow(2d).sum();
          Iterator<DoubleVectorElement> diffIterator = activationDifference
              .iterateNonZero();
          while (diffIterator.hasNext()) {
            DoubleVectorElement diffElement = diffIterator.next();
            double val = rowVector.get(diffElement.getIndex());
View Full Code Here

Examples of java.math.BigDecimal.pow()

        }
        BigDecimal mean = mean(numbers, context);
        List<BigDecimal> squares = new ArrayList<BigDecimal>();
        for (BigDecimal number : numbers) {
            BigDecimal XminMean = number.subtract(mean);
            squares.add(XminMean.pow(2, context));
        }
        BigDecimal sum = sum(squares);
        return sum.divide(new BigDecimal(biasCorrected ? numbers.size() - 1 : numbers.size()), context);

    }
View Full Code Here

Examples of java.math.BigDecimal.pow()

                }
            }
            final BigDecimal nP = new BigDecimal(numberOfPoints, mContext);
            BigDecimal tmp1 = pmc.subtract(c.multiply(pc, mContext), mContext);
            tmp1 = tmp1.multiply(nP);
            tmp1 = tmp1.pow(2, mContext);
            BigDecimal tmp2 = c.pow(2, mContext);
            tmp2 = BigDecimal.ONE.subtract(tmp2, mContext);
            tmp2 = tmp2.multiply(two, mContext);
            tmp2 = tmp2.divide(tmp1, mContext);
View Full Code Here

Examples of java.math.BigDecimal.pow()

            }

            // 2 / pow(numberOfPoints * pmc, 2);
            final BigDecimal nP = new BigDecimal(numberOfPoints, mContext);
            BigDecimal tmp1 = pmc.multiply(nP, mContext);
            tmp1 = tmp1.pow(2, mContext);
            BigDecimal tmp2 = two.divide(tmp1, mContext);

            points[iMax] = BigDecimal.ZERO;
            weights[iMax] = tmp2;
        }
View Full Code Here

Examples of java.math.BigDecimal.pow()

                    exSc -= exsub;
                    MathContext mctmp = new MathContext(expxby10.precision() - exsub + 2);
                    int pex = 1;
                    while (exsub-- > 0)
                        pex *= 10;
                    expxby10 = expxby10.pow(pex, mctmp);
                }
                return expxby10.round(mc);
            }
        }
    } /* BigDecimalMath.exp */
 
View Full Code Here

Examples of java.math.BigDecimal.pow()

             * So the precision here is matching the precisionn requested by mc, and the precision
             * requested for 2*pi is in absolute terms adjusted.
             */
            MathContext mcloc = new MathContext(2 + mc.getPrecision() + (int) (Math.log10((double) (n))));
            BigDecimal ftrm = pi(mcloc).multiply(TWO,mcloc);
            ftrm = ftrm.pow(n,mcloc);
            ftrm = ftrm.multiply(betsum.BigDecimalValue(mcloc),mcloc);
            BigDecimal exps = new BigDecimal(0);

            /* the basic accuracy of the accumulated terms before multiplication with 2
                        */
 
View Full Code Here

Examples of java.math.BigDecimal.pow()

            BigDecimal nd = n.getDecimalValue();
            long le = e.longValue();
            if (le > Integer.MAX_VALUE || le < Integer.MIN_VALUE) {
                throw new XPathException("exponent out of range");
            }
            return new DecimalValue(nd.pow((int)le));
            // Note JDK 1.5 dependency
//            try {
//                Class bigDecimalClass = nd.getClass();
//                Method pow = bigDecimalClass.getMethod("pow", new Class[]{int.class});
//                Integer[] argValues = {new Integer((int)le)};
View Full Code Here

Examples of java.math.BigDecimal.pow()

                }
            }
            final BigDecimal nP = new BigDecimal(numberOfPoints, mContext);
            BigDecimal tmp1 = pmc.subtract(c.multiply(pc, mContext), mContext);
            tmp1 = tmp1.multiply(nP);
            tmp1 = tmp1.pow(2, mContext);
            BigDecimal tmp2 = c.pow(2, mContext);
            tmp2 = BigDecimal.ONE.subtract(tmp2, mContext);
            tmp2 = tmp2.multiply(two, mContext);
            tmp2 = tmp2.divide(tmp1, mContext);
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.