Class LSHVectorEqualityTest


  • public class LSHVectorEqualityTest
    extends java.lang.Object
    This class tests equality calculations of the LSHVector class.
    • Constructor Detail

      • LSHVectorEqualityTest

        public LSHVectorEqualityTest()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Creates data objects for use in all tests.
        Throws:
        java.lang.Exception
        See Also:
        HashEntry
      • tearDown

        public void tearDown()
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testEquality1

        public void testEquality1()
        Test: 1. Hash arrays are null Expected Result: EQUAL
      • testEquality2

        public void testEquality2()
        Test: 1. Hash arrays are the same size 2. Elements are NULL Expected Result: EQUAL
      • testEquality3

        public void testEquality3()
        Test: 1. Hash arrays are different sizes 2. Elements are NULL Expected Result: NOT EQUAL
      • testEquality4

        public void testEquality4()
        Test: 1. Hash arrays are the same size 2. Hash arrays contain the same elements 3. Elements are in the same order 4. Elements contain the same values Note: entry1 and entry2 in this test contain the same values. This test is meant to verify that ordering does not matter in checking equality of the arrays, so the contents of the hash entry elements is kept the same to remove that as a variable. Expected Result: EQUAL
      • testEquality5

        public void testEquality5()
        Test: 1. Hash arrays are the same size 2. Hash arrays contain the same elements 3. Elements are NOT in the same order 4. Elements contain the same values Note: entry1 and entry2 in this test contain the same values. This test is meant to verify that ordering does not matter in checking equality of the arrays, so the contents of the hash entry elements is kept the same to remove that as a variable. Expected Result: EQUAL
      • testEquality6

        public void testEquality6()
        Test: 1. Hash arrays are the same size 2. Hash arrays contain the same elements 3. Elements are in the same order 4. Elements do NOT contain the same values Expected Result: EQUAL
      • testEquality7

        public void testEquality7()
        Test: 1. Hash arrays same size 2. Hash arrays contain same elements 3. Elements are NOT in the same order 4. Elements do NOT contain the same values Expected Result: NOT EQUAL
      • testEquality8

        public void testEquality8()
        Test: 1. Hash arrays same size 2. Hash arrays contain different elements Expected Result: NOT EQUAL
      • testEquality9

        public void testEquality9()
        Test: 1. Hash arrays different size Expected Result: NOT EQUAL
      • testEquality10

        public void testEquality10()
        Test: 1. Hash arrays are identical except for the HashEntry.getCoeff() value. These vectors should still be considered equal. Expected Result: EQUAL
      • testEquality11

        public void testEquality11()
        Test: 1. Hash arrays are identical except for the HashEntry.getTF() value. Expected Result: NOT EQUAL
      • testEquality12

        public void testEquality12()
        Test: 1. Hash arrays are identical except for the HashEntry.getCoeff() value. Expected Result: NOT EQUAL
      • testEquality13

        public void testEquality13()
        Test: 1. Elements contain the same IDF values calculated by WeightFactory Expected Result: EQUAL
      • testEquality14

        public void testEquality14()
        Test: 1. Elements contain different IDF values calculated by WeightFactory Expected Result: NOT EQUAL