Here you can find the source of toLong(double[] v)
public static long[] toLong(double[] v)
//package com.java2s; //License from project: Open Source License public class Main { public static long[] toLong(double[] v) { final long[] ans = new long[v.length]; for (int k = 0; k < v.length; k++) ans[k] = (long) v[k]; return (ans); }//from w w w . j a v a 2s . c o m public static long[] toLong(float[] v) { final long[] ans = new long[v.length]; for (int k = 0; k < v.length; k++) ans[k] = (long) v[k]; return (ans); } public static long[] toLong(int[] v) { final long[] ans = new long[v.length]; for (int k = 0; k < v.length; k++) ans[k] = (long) v[k]; return (ans); } public static long[][] toLong(float[][] v) { final long[][] ans = new long[v.length][]; for (int k = 0; k < v.length; k++) ans[k] = toLong(v[k]); return (ans); } public static long[][] toLong(double[][] v) { final long[][] ans = new long[v.length][]; for (int k = 0; k < v.length; k++) ans[k] = toLong(v[k]); return (ans); } public static long[][] toLong(int[][] v) { final long[][] ans = new long[v.length][]; for (int k = 0; k < v.length; k++) ans[k] = toLong(v[k]); return (ans); } }