Class GdistanceUtils

java.lang.Object
edu.cmu.tetrad.simulation.GdistanceUtils

public class GdistanceUtils extends Object
Created by Erich on 8/11/2016.
Version:
$Id: $Id
Author:
josephramsey
  • Method Details

    • histogram

      public static double[] histogram(List<Double> input, double[] thresholds)
      Calculates the histogram of a given list of input values based on thresholds. The histogram is an array of percents indicating how many values fall into each threshold bucket.
      Parameters:
      input - the list of input values
      thresholds - the array of thresholds that define the buckets
      Returns:
      the histogram as an array of percents for each bucket
      Throws:
      IllegalArgumentException - if any value in the input list is less than or equal to the last threshold