code: public static void elementPower(double a , DMatrixD1 B , DMatrixD1 C ) {
  
          if( B.numRows != C.numRows || B.numCols != C.numCols ) {
              throw new MatrixDimensionException("All matrices must be the same shape");
          }
  
          int size = B.getNumElements();
          for( int i = 0; i < size; i++ ) {
              C.data[i] = Math.pow(a, B.data[i]);
          }
      }
docs: <p>
  Element-wise power operation  <br>
  c<sub>ij</sub> = a ^ b<sub>ij</sub>
  <p>
  
  @param a left scalar
  @param B right side
  @param C output (modified)