Package edu.umd.cloud9.util.map

Examples of edu.umd.cloud9.util.map.HMapID.normalize()


    m1.put(2, 1.9);
    m1.put(3, 3.0);

    assertEquals(m1.length(), 4.2308393, 10E-6);

    m1.normalize();

    assertEquals(m1.get(1), 0.5436274, 10E-6);
    assertEquals(m1.get(2), 0.44908348, 10E-6);
    assertEquals(m1.get(3), 0.70907915, 10E-6);
    assertEquals(m1.length(), 1, 10E-6);
View Full Code Here


    m2.put(2, 4.3);
    m2.put(3, 5.0);

    assertEquals(m2.length(), 6.7029843, 10E-6);

    m2.normalize();

    assertEquals(m2.get(1), 0.17902474, 10E-6);
    assertEquals(m2.get(2), 0.64150536, 10E-6);
    assertEquals(m2.get(3), 0.7459364, 10E-6);
    assertEquals(m2.length(), 1, 10E-6);
View Full Code Here

    m1.put(2, 1.9f);
    m1.put(3, 3.0f);

    assertEquals(m1.length(), 4.2308393, 10E-6);

    m1.normalize();

    assertEquals(m1.get(1), 0.5436274, 10E-6);
    assertEquals(m1.get(2), 0.44908348, 10E-6);
    assertEquals(m1.get(3), 0.70907915, 10E-6);
    assertEquals(m1.length(), 1, 10E-6);
View Full Code Here

    m2.put(2, 4.3f);
    m2.put(3, 5.0f);

    assertEquals(m2.length(), 6.7029843, 10E-6);

    m2.normalize();

    assertEquals(m2.get(1), 0.17902474, 10E-6);
    assertEquals(m2.get(2), 0.64150536, 10E-6);
    assertEquals(m2.get(3), 0.7459364, 10E-6);
    assertEquals(m2.length(), 1, 10E-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.