Java Double Convert to convertDoubleMatrixToFloat(double[][] input, int dimRows, int dimColoumns)

Here you can find the source of convertDoubleMatrixToFloat(double[][] input, int dimRows, int dimColoumns)

Description

convert Double Matrix To Float

License

Open Source License

Declaration

public static float[][] convertDoubleMatrixToFloat(double[][] input,
            int dimRows, int dimColoumns) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static float[][] convertDoubleMatrixToFloat(double[][] input,
            int dimRows, int dimColoumns) {
        if (input == null) {
            return null; // Or throw an exception - your choice
        }//w  w  w . j  a  v  a2s  .  c  om

        float[][] output = new float[dimRows][dimColoumns];

        for (int i = 0; i < dimRows; i++) {
            for (int j = 0; j < dimColoumns; j++) {
                output[i][j] = (float) input[i][j];
            }
        }

        return output;
    }
}

Related

  1. convertDoubleArrayToString(double[] value, String separator)
  2. convertDoubleConsonant(byte[] b)
  3. convertDoubleFromBytes(final byte[] bytes)
  4. convertDoubleIntoHexadecimalString(double value, int precision)
  5. convertDoubleList(Double[] list)
  6. convertDoubleNumberFromSciNotation(String numberInScientificNotation)
  7. convertDoubles(Double[] doubles)
  8. convertDoubleShareToString(double shares)
  9. convertDoubleSizeToViPRLong(double size)