sugr.test
Class RelationTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bysugr.test.RelationTest
All Implemented Interfaces:
junit.framework.Test

public class RelationTest
extends junit.framework.TestCase

Test for Relation.

Author:
Achim Königs

Constructor Summary
RelationTest()
           
 
Method Summary
 boolean helpTests(Entity first, Entity second, java.lang.Class relation, int start, TestTools.ProgressMonitorWithTaskbar pm, java.lang.String name)
           
 void testDecision()
          Test for decision.
 void testGetAlpha()
          getter for alpha, used in Relation
 void testGetChiSquareDistributionValue()
          Test for getChiSquareDistributionValue() tests alpha of 95, 99, and 90 for all used dof's Differences to Matlab: all getting better from dof1 to dof4 for alpha = 0.95 dof1 differs 0.09, dof4 only 0.02 for alpha = 0.90 dof1 differs 0.06, dof4 0.03 for alpha = 0.99 dof1 differs 0.04, dof2 0.01, dof2 and dof3 0.02
 void testGetCondition()
          getter for condition flag
 void testGetD()
          gets D.
 void testGetSigma()
          gets sigma_dd, calculated in constructor
 void testRelationBiRelationalPropertyEntity()
          Test for Relation(BiRelationalProperty, Entity) mostly the same as above, but relationalproperty is constructed before relation.
 void testRelationBiRelationalPropertyEntityboolean()
          Test for Relation(BiRelationalProperty, Entity, boolean) Same as above, but condition is controlled explicitly here.
 void testRelationEntityEntityClass()
          Test for Relation(Entity, Entity, Class) Tests only for one example.
 void testRelationEntityEntityClassboolean()
          Test for Relation(Entity, Entity, Class, boolean) mostly the same thing as above, but conditioning is switched on.
 void testSetAlpha()
          setter for alpha.
 void testSetCondition()
          recalculates the test!
 void testTests()
          Tests if tests are calculated correctly.
 void testTestThreshold()
          gets the test threshold, that is chi˛
 void testTestValue()
          Test for testValue() This returns t.
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelationTest

public RelationTest()
Method Detail

testRelationEntityEntityClass

public void testRelationEntityEntityClass()
Test for Relation(Entity, Entity, Class) Tests only for one example. Reason is given below.


testRelationEntityEntityClassboolean

public void testRelationEntityEntityClassboolean()
Test for Relation(Entity, Entity, Class, boolean) mostly the same thing as above, but conditioning is switched on.


testRelationBiRelationalPropertyEntity

public void testRelationBiRelationalPropertyEntity()
Test for Relation(BiRelationalProperty, Entity) mostly the same as above, but relationalproperty is constructed before relation.


testRelationBiRelationalPropertyEntityboolean

public void testRelationBiRelationalPropertyEntityboolean()
Test for Relation(BiRelationalProperty, Entity, boolean) Same as above, but condition is controlled explicitly here.


testDecision

public void testDecision()
Test for decision. This only returns some value, calculated already in constructor. Is very similar to testing of the constructors:


testTestValue

public void testTestValue()
Test for testValue() This returns t. t = d^T * Sigma_dd^+ * d


testGetChiSquareDistributionValue

public void testGetChiSquareDistributionValue()
Test for getChiSquareDistributionValue() tests alpha of 95, 99, and 90 for all used dof's Differences to Matlab: all getting better from dof1 to dof4 for alpha = 0.95 dof1 differs 0.09, dof4 only 0.02 for alpha = 0.90 dof1 differs 0.06, dof4 0.03 for alpha = 0.99 dof1 differs 0.04, dof2 0.01, dof2 and dof3 0.02


testGetAlpha

public void testGetAlpha()
getter for alpha, used in Relation


testSetAlpha

public void testSetAlpha()
setter for alpha. Test tests if setting alpha shows effect on calculation.


testSetCondition

public void testSetCondition()
recalculates the test! But conditioning itself is tested in estimation tests! here only tests if flag is set properly.


testGetCondition

public void testGetCondition()
getter for condition flag


testTestThreshold

public void testTestThreshold()
gets the test threshold, that is chi˛


testGetD

public void testGetD()
gets D. That is the unmodified result of the multiplication with the jacobians (if near zero relation is true)


testGetSigma

public void testGetSigma()
gets sigma_dd, calculated in constructor


testTests

public void testTests()
Tests if tests are calculated correctly. Doesn't test ALL possible combinations, because the test relys on the jacobians.


helpTests

public boolean helpTests(Entity first,
                         Entity second,
                         java.lang.Class relation,
                         int start,
                         TestTools.ProgressMonitorWithTaskbar pm,
                         java.lang.String name)