@Test public void shouldCorrectlyPlaceAnOddNumberOfFloatValuesIntoSmallerNumberOfBucketsWithMinimumAndMaximumRanges() { Float[] values = {3.0f, 1.0f, 2.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; Histogram<Float> gram = new Histogram<Float>(new FloatOperations(), values); gram.setBucketCount(5); assertBucketValueCount(gram, 2, 2, 2, 2, 2); }
public Histogram<T> setBucketCount( int count ) { if (count != this.bucketCount) { this.bucketCount = count; this.bucketWidth = null; this.buckets.clear(); } return this; }
Histogram { public Histogram<T> setBucketCount( int count ) { if (count != this.bucketCount) { this.bucketCount = count; this.bucketWidth = null; this.buckets.clear(); } return this; } }
Histogram { public Histogram<T> setBucketCount( int count ) { if (count != this.bucketCount) { this.bucketCount = count; this.bucketWidth = null; this.buckets.clear(); } return this; } Histogram( MathOperations<T> operations,
                      List<T> values ); @SafeVarargs  Histogram( MathOperations<T> operations, T... values ); }
Histogram { public Histogram<T> setBucketCount( int count ) { if (count != this.bucketCount) { this.bucketCount = count; this.bucketWidth = null; this.buckets.clear(); } return this; } Histogram( MathOperations<T> operations,
                      List<T> values ); @SafeVarargs  Histogram( MathOperations<T> operations, T... values ); BucketingStrategy getStrategy(); MathOperations<T> getMathOperations(); void setStrategy( double median,
                             double standardDeviation,
                             int sigma ); void setStrategy( T minimum,
                             T maximum ); void setStrategyToDefault(); int getSignificantFigures(); Histogram<T> setSignificantFigures( int significantFigures ); int getBucketCount(); Histogram<T> setBucketCount( int count ); List<Bucket> getBuckets(); long getTotalNumberOfValues(); List<String> getTextGraph( int maxBarLength ); }
Histogram { public Histogram<T> setBucketCount( int count ) { if (count != this.bucketCount) { this.bucketCount = count; this.bucketWidth = null; this.buckets.clear(); } return this; } Histogram( MathOperations<T> operations,
                      List<T> values ); @SafeVarargs  Histogram( MathOperations<T> operations, T... values ); BucketingStrategy getStrategy(); MathOperations<T> getMathOperations(); void setStrategy( double median,
                             double standardDeviation,
                             int sigma ); void setStrategy( T minimum,
                             T maximum ); void setStrategyToDefault(); int getSignificantFigures(); Histogram<T> setSignificantFigures( int significantFigures ); int getBucketCount(); Histogram<T> setBucketCount( int count ); List<Bucket> getBuckets(); long getTotalNumberOfValues(); List<String> getTextGraph( int maxBarLength ); static final int DEFAULT_BUCKET_COUNT; static final int DEFAULT_SIGNIFICANT_FIGURES; }