Java Integer Convert To convertIntDouble(int[][] in)

Here you can find the source of convertIntDouble(int[][] in)

Description

Convert an integer 2-D array to a double array.

License

Open Source License

Parameter

Parameter Description
in the integer array to convert

Return

the input array converted to double type

Declaration

public static double[][] convertIntDouble(int[][] in) 

Method Source Code

//package com.java2s;
/** Implement various functionality for working with arrays and Lists
 *
 * @package SciTK/*from w w  w.  j av  a2 s  .  c o m*/
 * @class ArrayUtil
 * @brief Convert arrays
 * @author Alex Zylstra
 * @date 2013/04/15
 * @copyright Alex Zylstra
 * @license SciTK / MIT License
 */

public class Main {
    /** Convert an integer 2-D array to a double array.
     * @param in the integer array to convert
     * @return the input array converted to double type
     */
    public static double[][] convertIntDouble(int[][] in) {
        double[][] ret = new double[in.length][in[0].length];
        for (int i = 0; i < in.length; i++) {
            for (int j = 0; j < in.length; j++)
                ret[i][j] = (double) in[i][j];
        }
        return ret;
    }
}

Related

  1. convertIntArray(int[] arr)
  2. convertIntArray(int[] in)
  3. convertIntArrayFromHex(char[] hex)
  4. convertIntBitsMSBinaryToIEEE(int source)
  5. convertIntColourToByteArray(int intColour)
  6. convertInteger(String input, int maxLen)
  7. convertInteger(String str)
  8. convertIntegerArrayToInt(Integer[] integerArray)
  9. convertIntegerToInt(Integer[] values)