예제 #1
0
 /// <summary>
 ///   Computes (populates) an Histogram mapping with values from a sample. A selection rule
 ///   can be (optionally) chosen to better organize the histogram.
 /// </summary>
 /// <param name="data"></param>
 /// <param name="segmentCount"></param>
 public void Compute(int[] data, int segmentCount)
 {
     this.m_range    = (DoubleRange)IntRange.GetRange(data);
     this.m_binCount = segmentCount;
     this.m_binWidth = this.m_range.Length / segmentCount;
     this.Compute(data);
 }
예제 #2
0
 /// <summary>
 ///   Computes (populates) an Histogram mapping with values from a sample. A selection rule
 ///   can be (optionally) chosen to optimize the histogram visualization.
 /// </summary>
 /// <param name="data">A range of discrete values.</param>
 /// <param name="segmentSize"></param>
 public void Compute(int[] data, double segmentSize)
 {
     this.m_range    = (DoubleRange)IntRange.GetRange(data);
     this.m_binWidth = segmentSize;
     this.m_binCount = (int)Math.Ceiling(m_range.Length / segmentSize);
     this.Compute(data);
 }