Package generic.lsh.vector
Class LSHVectorEqualityTest
- java.lang.Object
-
- generic.lsh.vector.LSHVectorEqualityTest
-
public class LSHVectorEqualityTest extends java.lang.ObjectThis class tests equality calculations of theLSHVectorclass.
-
-
Constructor Summary
Constructors Constructor Description LSHVectorEqualityTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()Creates data objects for use in all tests.voidtearDown()voidtestEquality1()Test: 1.voidtestEquality10()Test: 1.voidtestEquality11()Test: 1.voidtestEquality12()Test: 1.voidtestEquality13()Test: 1.voidtestEquality14()Test: 1.voidtestEquality2()Test: 1.voidtestEquality3()Test: 1.voidtestEquality4()Test: 1.voidtestEquality5()Test: 1.voidtestEquality6()Test: 1.voidtestEquality7()Test: 1.voidtestEquality8()Test: 1.voidtestEquality9()Test: 1.
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.ExceptionCreates 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 theHashEntry.getCoeff()value. These vectors should still be considered equal. Expected Result: EQUAL
-
testEquality11
public void testEquality11()
Test: 1. Hash arrays are identical except for theHashEntry.getTF()value. Expected Result: NOT EQUAL
-
testEquality12
public void testEquality12()
Test: 1. Hash arrays are identical except for theHashEntry.getCoeff()value. Expected Result: NOT EQUAL
-
testEquality13
public void testEquality13()
Test: 1. Elements contain the same IDF values calculated byWeightFactoryExpected Result: EQUAL
-
testEquality14
public void testEquality14()
Test: 1. Elements contain different IDF values calculated byWeightFactoryExpected Result: NOT EQUAL
-
-