sugr.test
Class Point_3DTest

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

public class Point_3DTest
extends junit.framework.TestCase

Tests for class Point_3D. Most important are the constructors which construct a point out of other entities. Uses TestStatistics.class and TestTools.class.

Author:
Achim Königs

Field Summary
static int MAXITER
          int MAXITER determines how many iterations there are for calculation of the statstic parts.
 
Constructor Summary
Point_3DTest(java.lang.String arg0)
          Constructor for Point_3DTest.
 
Method Summary
 boolean helpPoint_3DLine_3DPlane_3DStatistics(Line_3D line, Plane_3D plane, double sigma)
          Method to test the statistic reasoning of a point out of a line and a plane.
 boolean helpPoint_3DPlane_3DLine_3DStatistics(Plane_3D plane, Line_3D line, double sigma)
          Method to test the statistic reasoning of a point out of a plane and a lines.
 boolean helpPoint_3DPlane_3DPlane_3DPlane_3DStatistics(Plane_3D plane1, Plane_3D plane2, Plane_3D plane3, double sigma)
          Method to test the statistic reasoning of a point out of three uncertain planes.
 void testCopy()
          Test for copy().
 void testGetDegreesOfFreedom()
          Test for getDegreesOfFreedom()
 void testGetDimension()
          Test for getDimension()
 void testGetDistance()
          Test for getDistance()
 void testGetDistanceToOrigin()
          Test for getDistanceToOrigin.
 void testGetDofOfRelation()
          Test for getDofOfRelation.
 void testGetEuclideanPart()
          Test for getEuclideanPart()
 void testGetHomogeneousPart()
          Test for getHomogeneousPart()
 void testGetJacobianOfRelationClassClass()
          Test for Matrix getJacobianOfRelation(Class, Class).
 void testNormalizeEuclidean()
          Test for normalizeEuclidean, uses TestTools.
 void testPi()
          Test for Matrix Pi()
 void testPiDual()
          Test for Matrix PiDual() Note that PiDual differs from that of the dissertation (sign) because of other definition of C
 void testPiDualVector()
          Test for Matrix PiDual(Vector)
 void testPiVector()
          Test for Matrix Pi(Vector)
 void testPoint_3D()
          Test for void Point_3D()
 void testPoint_3Ddoubledoubledouble()
          Test for void Point_3D(double, double, double)
 void testPoint_3Ddoubledoubledoubledouble()
          Test for void Point_3D(double, double, double, double)
 void testPoint_3Ddoubledoubledoubledoubledoubledouble()
          Test for Point_3D(x,y,z,sigma_x,sigma_y,sigma_z)
 void testPoint_3DdoubledoubledoubledoubleMatrix()
          Test for void Point_3D(double, double, double, double, Matrix)
 void testPoint_3DdoubledoubledoubleMatrix()
          Test for void Point_3D(double, double, double, Matrix)
 void testPoint_3DLine_3DPlane_3D()
          Test for void Point_3D(Line_3D, Plane_3D) does the same as test above, but uses other values.
 void testPoint_3DPlane_3DLine_3D()
          Test for void Point_3D(Plane_3D, Line_3D) tests the reasoning of a point out of a plane and a line three times with help of class TestStatistics
 void testPoint_3DPlane_3DPlane_3DPlane_3D()
          Test for void Point_3D(Plane_3D, Plane_3D, Plane_3D) Tests reasoning of a point out of three planes with help of class TestStatistics.
 void testPoint_3DVectorMatrix()
          Test for void Point_3D(Vector, Matrix).
 
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
 

Field Detail

MAXITER

public static int MAXITER
int MAXITER determines how many iterations there are for calculation of the statstic parts. It should be around 1 000 000 for good results, but this may mean much work for your maschine and some coffee for you, if you are waiting for the results.

Constructor Detail

Point_3DTest

public Point_3DTest(java.lang.String arg0)
Constructor for Point_3DTest.

Parameters:
arg0 -
Method Detail

helpPoint_3DPlane_3DLine_3DStatistics

public boolean helpPoint_3DPlane_3DLine_3DStatistics(Plane_3D plane,
                                                     Line_3D line,
                                                     double sigma)
Method to test the statistic reasoning of a point out of a plane and a lines.

Parameters:
plane - - plane to cross with line
line - - line to cross with plane
Returns:
- true if test is successful

helpPoint_3DLine_3DPlane_3DStatistics

public boolean helpPoint_3DLine_3DPlane_3DStatistics(Line_3D line,
                                                     Plane_3D plane,
                                                     double sigma)
Method to test the statistic reasoning of a point out of a line and a plane.

Parameters:
line - - line to cross with plane
plane - - plane to cross with line.
Returns:
- true if test is successful

helpPoint_3DPlane_3DPlane_3DPlane_3DStatistics

public boolean helpPoint_3DPlane_3DPlane_3DPlane_3DStatistics(Plane_3D plane1,
                                                              Plane_3D plane2,
                                                              Plane_3D plane3,
                                                              double sigma)
Method to test the statistic reasoning of a point out of three uncertain planes.

Parameters:
plane1 - - first plane
plane2 - - second plane
plane3 - - third plane
Returns:
- true if test is successful

testGetDegreesOfFreedom

public void testGetDegreesOfFreedom()
Test for getDegreesOfFreedom()


testGetDimension

public void testGetDimension()
Test for getDimension()


testGetEuclideanPart

public void testGetEuclideanPart()
Test for getEuclideanPart()


testGetHomogeneousPart

public void testGetHomogeneousPart()
Test for getHomogeneousPart()


testGetJacobianOfRelationClassClass

public void testGetJacobianOfRelationClassClass()
Test for Matrix getJacobianOfRelation(Class, Class). Tests the calculation of Jacobians for some cases with the use of the constraint f(x)*y = x * f(y) = 0. Then calculates the jacobians and compares them to the ones given back from sugr. At last tests if all forbidden combinations throw an exception


testGetDofOfRelation

public void testGetDofOfRelation()
Test for getDofOfRelation. Tests degrees of freedom for all three allowed combinations and tests if exceptoins are thrown for all others.


testNormalizeEuclidean

public void testNormalizeEuclidean()
Test for normalizeEuclidean, uses TestTools. Tests the normization of one million points without covariance then tests three normilizations with covariances.


testGetDistance

public void testGetDistance()
Test for getDistance()


testPoint_3DVectorMatrix

public void testPoint_3DVectorMatrix()
Test for void Point_3D(Vector, Matrix).


testPoint_3DPlane_3DLine_3D

public void testPoint_3DPlane_3DLine_3D()
Test for void Point_3D(Plane_3D, Line_3D) tests the reasoning of a point out of a plane and a line three times with help of class TestStatistics


testPoint_3DLine_3DPlane_3D

public void testPoint_3DLine_3DPlane_3D()
Test for void Point_3D(Line_3D, Plane_3D) does the same as test above, but uses other values.


testPoint_3DPlane_3DPlane_3DPlane_3D

public void testPoint_3DPlane_3DPlane_3DPlane_3D()
Test for void Point_3D(Plane_3D, Plane_3D, Plane_3D) Tests reasoning of a point out of three planes with help of class TestStatistics.


testPoint_3Ddoubledoubledoubledouble

public void testPoint_3Ddoubledoubledoubledouble()
Test for void Point_3D(double, double, double, double)


testPoint_3Ddoubledoubledoubledoubledoubledouble

public void testPoint_3Ddoubledoubledoubledoubledoubledouble()
Test for Point_3D(x,y,z,sigma_x,sigma_y,sigma_z)


testPoint_3DdoubledoubledoubledoubleMatrix

public void testPoint_3DdoubledoubledoubledoubleMatrix()
Test for void Point_3D(double, double, double, double, Matrix)


testPoint_3Ddoubledoubledouble

public void testPoint_3Ddoubledoubledouble()
Test for void Point_3D(double, double, double)


testPoint_3DdoubledoubledoubleMatrix

public void testPoint_3DdoubledoubledoubleMatrix()
Test for void Point_3D(double, double, double, Matrix)


testPoint_3D

public void testPoint_3D()
Test for void Point_3D()


testCopy

public void testCopy()
Test for copy(). Changes original to proof that copy is independent of it.


testPi

public void testPi()
Test for Matrix Pi()


testPiVector

public void testPiVector()
Test for Matrix Pi(Vector)


testPiDual

public void testPiDual()
Test for Matrix PiDual() Note that PiDual differs from that of the dissertation (sign) because of other definition of C


testPiDualVector

public void testPiDualVector()
Test for Matrix PiDual(Vector)


testGetDistanceToOrigin

public void testGetDistanceToOrigin()
Test for getDistanceToOrigin. Tests the distance to the origin for one million points.