Package com.googlecode.gaal.data.api

Examples of com.googlecode.gaal.data.api.Vector.norm()


    public void testNorm() {
        Vector vector = new SparseVector();
        vector.add(10, 3);
        vector.add(20, 4);
        System.out.println(vector);
        assertTrue(vector.norm() == 5);
        vector.add(10, 3);
        vector.add(20, 4);
        System.out.println(vector);
        assertTrue(vector.norm() == 10);
    }
View Full Code Here


        System.out.println(vector);
        assertTrue(vector.norm() == 5);
        vector.add(10, 3);
        vector.add(20, 4);
        System.out.println(vector);
        assertTrue(vector.norm() == 10);
    }

    @Test
    public void testSimilarity() {
        Vector vector1 = new SparseVector();
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.