Here you can find the source of pow(double[][] x, int p)
public static double[][] pow(double[][] x, int p)
//package com.java2s; /*//from w w w. java2 s . c om * ------------------------------------------------------------------------ Copyright 2016 by Aaron * Hart Email: Aaron.Hart@gmail.com * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU General Public License, Version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along with this program; if * not, see <http://www.gnu.org/licenses>. * --------------------------------------------------------------------- * * Created on December 14, 2016 by Aaron Hart */ public class Main { public static double[][] pow(double[][] x, int p) { for (int i = 0; i < x.length; i++) { for (int j = 0; j < x[0].length; j++) { x[i][j] = Math.pow(x[i][j], p); } } return x; } }