Here you can find the source of pow(double[] array, double exp)
Parameter | Description |
---|---|
array | a parameter |
exp | the exponent. |
public static double[] pow(double[] array, double exp)
//package com.java2s; /*// w ww . j a v a2 s . co m * Copyright (C) 2010-2014 Andreas Maier * CONRAD is developed as an Open Source project under the GNU General Public License (GPL). */ public class Main { /** * calls Math.pow for each element of the array * @param array * @param exp the exponent. * @return reference to the input array */ public static double[] pow(double[] array, double exp) { for (int i = 0; i < array.length; i++) { array[i] = Math.pow(array[i], exp); } return array; } }