Package org.jboss.dna.common.math

Examples of org.jboss.dna.common.math.FloatOperations


                                                                + gram.getBucketCount() + " buckets: ");
    }

    @Test
    public void shouldCorrectlyConstructBoundariesWithWindowSmallerThanActualFloats() {
        List<Float> boundaries = Histogram.getBucketBoundaries(new FloatOperations(), 10.0f, 20.0f, 5.0f, 25.0f, 12, 3);
        assertNotNull(boundaries);
        assertEquals(13, boundaries.size());
        Float[] expectedBoundaries = {5.0f, 10.0f, 11f, 12f, 13f, 14f, 15f, 16f, 17f, 18f, 19f, 20f, 25f};
        assertArrayEquals(expectedBoundaries, boundaries.toArray(new Float[boundaries.size()]));
    }
View Full Code Here


        assertArrayEquals(expectedBoundaries, boundaries.toArray(new Float[boundaries.size()]));
    }

    @Test
    public void shouldCorrectlyConstructBoundariesWithWindowSmallerThanActualNarrowlyVaryingFloats() {
        List<Float> boundaries = Histogram.getBucketBoundaries(new FloatOperations(),
                                                               10.00020f,
                                                               10.00030f,
                                                               10.00011f,
                                                               10.00050f,
                                                               12,
View Full Code Here

TOP

Related Classes of org.jboss.dna.common.math.FloatOperations

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.