Java Array Print prettyPrint(double[][] gammas, double[][] thetas, double[][] zprobs)

Here you can find the source of prettyPrint(double[][] gammas, double[][] thetas, double[][] zprobs)

Description

pretty Print

License

Open Source License

Declaration

public static void prettyPrint(double[][] gammas, double[][] thetas, double[][] zprobs) 

Method Source Code


//package com.java2s;
import java.util.Arrays;

public class Main {
    public static void prettyPrint(double[][] gammas, double[][] thetas, double[][] zprobs) {
        prettyPrint("GAMMAS", gammas);
        prettyPrint("THETAS", thetas);
        prettyPrint("ZPROBS", zprobs);
    }// w w  w . jav a 2 s .  c o  m

    public static void prettyPrint(String name, double[][] matrix) {
        prettyPrint(name, matrix, matrix.length);
    }

    public static void prettyPrint(String name, double[][] matrix, int maxCount) {
        System.out.println(name + ": ");
        for (double[] array : matrix) {
            System.out.println(Arrays.toString(array));
            if (maxCount-- < 0)
                break;
        }
        System.out.println();
    }
}

Related

  1. formatStringForPrettyPrintingRelatedValues(double[] values, int minDigits)
  2. print(Object[] array)
  3. print(Object[] array)
  4. print(String[] files)
  5. print1DIntArray(int[] array)