Examples of FloatOperations


Examples of org.modeshape.common.math.FloatOperations

        assertBucketValueCount(gram, 1, 1, 7, 1, 1, 5);
    }

    @Test
    public void shouldCorrectlyPlace1000RandomFloatValues() {
        Histogram<Float> gram = createRandomHistogram(10.0f, 100.0f, 1000, new FloatOperations());
        // gram.setDesiredRange(0.0f,100.0f);
        HistogramTest.writeHistogramToLog(this.logger,
                                          gram,
                                          0,
                                          "Histogram of 1000 random float values in " + gram.getBucketCount() + " buckets: ");
View Full Code Here

Examples of org.modeshape.common.math.FloatOperations

                                          "Histogram of 1000 random float values in " + 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

Examples of org.modeshape.common.math.FloatOperations

        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
Copyright © 2018 www.massapi.com. 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.