Examples of ImmutableVector


Examples of mikera.vectorz.impl.ImmutableVector

        domain = new PreferenceDomain(0.5, 5.0, 0.5);
    }

    @Test
    public void testMakeValues() {
        ImmutableVector vals = PreferenceDomainQuantizer.makeValues(domain);
        ImmutableVector evals = ImmutableVector.of(0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0);
        assertThat(vals.length(), equalTo(evals.length()));
        for (int i = 0; i < vals.length(); i++) {
            assertThat("element " + i,
                       vals.get(i),
                       closeTo(evals.get(i), 1.0e-6));
        }
    }
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.