sugr.test
Class TestTools

java.lang.Object
  extended bysugr.test.TestTools

public class TestTools
extends java.lang.Object

Class that contaions some functions often used to test sugr classes.

Author:
Achim Königs

Nested Class Summary
static class TestTools.ProgressMonitorWithTaskbar
           
 
Constructor Summary
TestTools()
           
 
Method Summary
static boolean helpDofOfRelations(java.lang.Class[][] allowed, Entity ent)
          Method to test all unallowed possibilities of getDofOfRelatoin returns false if one of the unallowed combinations doesn't return an error.
static boolean helpJacobianOfRelations(java.lang.Class[][] allowed, Entity ent)
          Method to test all unallowed possibilities of getJacobianOfRelatoin returns false if one of the unallowed combinations doesn't return an error.
static boolean helpNormalizeEuclideanStatistics(Entity test)
          Function that test's if the normalization of a point still is correct when uncertainity is used
static boolean helpNormalizeEuclideanStatistics(Entity test, double prec)
          Function that test's if the normalization of a point still is correct when uncertainity is used
static boolean helpNormalizeEuclideanStatistics(Entity test, int iterations)
          Function that test's if the normalization of a point still is correct when uncertainity is used
static boolean helpNormalizeEuclideanStatistics(Entity test, int iterations, double prec)
          Function that test's if the normalization of a point still is correct when uncertainity is used
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestTools

public TestTools()
Method Detail

helpNormalizeEuclideanStatistics

public static boolean helpNormalizeEuclideanStatistics(Entity test,
                                                       int iterations,
                                                       double prec)
Function that test's if the normalization of a point still is correct when uncertainity is used

Parameters:
test - - the entity to be tested
iterations - - the number of iterations (should be at least >=100,000)
prec - - the relative precision with which the results must match
Returns:
- true if test was successful.

helpNormalizeEuclideanStatistics

public static boolean helpNormalizeEuclideanStatistics(Entity test,
                                                       int iterations)
Function that test's if the normalization of a point still is correct when uncertainity is used

Parameters:
test - - the point to be tested
iterations - - the number of iterations (should be at least >=100,000)
Returns:
- true if test was successful.

helpNormalizeEuclideanStatistics

public static boolean helpNormalizeEuclideanStatistics(Entity test)
Function that test's if the normalization of a point still is correct when uncertainity is used

Parameters:
test - - the entity to be tested
Returns:
- true if test was successful.

helpNormalizeEuclideanStatistics

public static boolean helpNormalizeEuclideanStatistics(Entity test,
                                                       double prec)
Function that test's if the normalization of a point still is correct when uncertainity is used

Parameters:
test - - the entity to be tested
prec - - the relative precision with which the results must match
Returns:
- true if test was successful.

helpJacobianOfRelations

public static boolean helpJacobianOfRelations(java.lang.Class[][] allowed,
                                              Entity ent)
Method to test all unallowed possibilities of getJacobianOfRelatoin returns false if one of the unallowed combinations doesn't return an error.

Parameters:
allowed - - two dimensional array of classes which are all allowed combinations for that entity
ent - - an entity of the class to be tested
Returns:
- true if all unallowed combinations fail, false if one doesn't.

helpDofOfRelations

public static boolean helpDofOfRelations(java.lang.Class[][] allowed,
                                         Entity ent)
Method to test all unallowed possibilities of getDofOfRelatoin returns false if one of the unallowed combinations doesn't return an error.

Parameters:
allowed - - two dimensional array of classes which are all allowed combinations for that entity
ent - - an entity of the class to be tested
Returns:
- true if all unallowed combinations fail, false if one doesn't.