code: public static void histogram( double[] colors, int length , Histogram_F64 histogram )
  	{
  		if( length % histogram.getDimensions() != 0 )
  			throw new IllegalArgumentException("Length does not match dimensions");
  
  		int coordinate[] = new int[ histogram.getDimensions() ];
  
  		histogram.fill(0);
  
  		for (int i = 0; i < length; ) {
  			for (int j = 0; j < coordinate.length; j++, i++) {
  				coordinate[j] = histogram.getDimensionIndex(j,colors[i]);
  			}
  
  			int index = histogram.getIndex(coordinate);
  			histogram.value[index] += 1.0;
  		}
  	}
docs: Computes a coupled histogram from a list of colors.  If the input is for integer values then add one
  to the maximum value.  For example if the range of values is 0 to 255, then make it 0 to 256.
  
  @param colors List of colors stored in an interleaved format
  @param length Length of usable portion of colors
  @param histogram Output and histogram configuration.