double diff = minDiff(values, true); double roundingFactor = Math.round(Math.log(diff) / Math.log(10) - 0.5); if (roundingFactor > -minDigits) roundingFactor = -minDigits; double normFactor = Math.pow(10, roundingFactor); roundingFactor = -roundingFactor; return "%." + String.format("%.0f", roundingFactor) + "f";
prettyPrint("GAMMAS", gammas); prettyPrint("THETAS", thetas); prettyPrint("ZPROBS", zprobs);
if (array == null) { System.out.println("object is null"); } else { System.out.println(Arrays.asList(array));
for (int i = 0; i < files.length; i++) { System.out.print(files[i] + " "); System.out.print("\n");
StringBuilder sb = new StringBuilder(); for (int i = 0; i < array.length; i++) { if (i > 0) { sb.append(" "); sb.append(array[i] ? "1" : "0"); return sb.reverse().toString(); ...
Prints on console the elements of a double array.
System.out.println(array2string(_a));
Prints on console the elements of an array of doubles
System.out.println(array2string(_a));
for (int i = 0; i < a.length; i++) { System.out.format("%.2f ", a[i]); System.out.println();