code: public static DoubleMatrix powi(DoubleMatrix x, double d) {
  		if (d == 2.0)
  			return x.muli(x);
  		else {
  			for (int i = 0; i < x.length; i++)
  				x.put(i, (double) Math.pow(x.get(i), d));
  			return x;
  		}
  	}
docs: Element-wise power function. Replaces each element with its
  power of <tt>d</tt>.Note that this is an in-place operation.
  @param d the exponent
  @see MatrixFunctions#pow(DoubleMatrix,double)
  @return this matrix