sugr.test
Class Line_3DTest

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

public class Line_3DTest
extends junit.framework.TestCase

Tests for class Line_3D. Most important are the constructors which construct a plane 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
Line_3DTest(java.lang.String arg0)
          Constructor for Line_3DTest.
 
Method Summary
 boolean helpLine_3DPlane_3DPlane_3DStatistics(Plane_3D plane1, Plane_3D plane2, double sigma)
          Method to test the statistic reasoning of a line out two uncertain planes.
 boolean helpLine_3DPoint_3DPoint_3DStatistics(Point_3D point1, Point_3D point2, double sigma)
          Method to test the statistic reasoning of a line out of two uncertain points.
 void testCheckPlueckerCondition()
          Test for checkPlueckerCondition() Tests with two lines.
 void testCopy()
          Test for copy() Just copys a line, then changes original to test whether it does a deep copy or not.
 void testDualMatrixC()
          Tests if the Matrix C is "calculated" properly
 void testGamma()
          Test for Matrix Gamma()
 void testGammaDual()
          Test for Matrix GammaDual() Does the same as testGammaDual(Vector).
 void testGammaDualVector()
          Test for Matrix GammaDual(Vector) Lets sugr calculate gamma dual then calculates the matrix and controls the results
 void testGammaVector()
          Test for Matrix Gamma(Vector)
 void testGetDegreesOfFreedom()
          Test for getDegreesOfFreedom()
 void testGetDimension()
          Test for getDimension()
 void testGetDistance()
          Test for getDistance() Calculates distance between one million points and lines
 void testGetDistanceToOrigin()
          Tests getDistanceToOrigin() over one million points uses the general formular for distance to points.
 void testGetDofOfRelation()
          Test for getDofOfRelation()
 void testGetDual()
          Test for getDual() Tests calculation of the dual over one million points includes test for error propagation
 void testGetEuclideanPart()
          Test for getEuclideanPart()
 void testGetHomogeneousPart()
          Test for getHomogeneousPart()
 void testGetJacobianOfRelationClassClass()
          Test for Matrix getJacobianOfRelation(Class, Class) Tests if the Jacobian look like they should according to documentation (sugr handbook) and if they do what they should.
 void testGetLineLineJacobian()
          Test getLineLineJacobian(), used to calculate the jacobian for equaltest between two lines.
 void testJGamma()
          Tests if JGamma is calculated properly Tests Matrix value by value, then tests if it fullfills vec(GammaDual(L) = JGamma*C*L for a L.
 void testLine_3D()
          Test for void Line_3D()
 void testLine_3Ddoubledoubledoubledoubledoubledouble()
          Test for void Line_3D(double, double, double, double, double, double)
 void testLine_3DdoubledoubledoubledoubledoubledoubleMatrix()
          Test for void Line_3D(double, double, double, double, double, double, Matrix)
 void testLine_3DdoubledoubledoubledoubledoubledoubleMatrixboolean()
          Test for void Line_3D(double, double, double, double, double, double, Matrix, boolean)
 void testLine_3DPlane_3DPlane_3D()
          Test for Line_3D(Plane_3D, Plane_3D) That means construct a Line_3D out of two Planes.
 void testLine_3DPoint_3DPoint_3D()
          Test for Line_3D(Point_3D, Point_3D) That means construct a Line_3D out of two points.
 void testLine_3DVectorMatrix()
          Test for void Line_3D(Vector, Matrix)
 void testNormalizeEuclidean()
          Test for normailzeEuclidean.
 
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

Line_3DTest

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

Parameters:
arg0 -
Method Detail

helpLine_3DPoint_3DPoint_3DStatistics

public boolean helpLine_3DPoint_3DPoint_3DStatistics(Point_3D point1,
                                                     Point_3D point2,
                                                     double sigma)
Method to test the statistic reasoning of a line out of two uncertain points.

Parameters:
point1 - - the point first
point2 - - the second point to be connected to the first one
Returns:
- true if test is successful

helpLine_3DPlane_3DPlane_3DStatistics

public boolean helpLine_3DPlane_3DPlane_3DStatistics(Plane_3D plane1,
                                                     Plane_3D plane2,
                                                     double sigma)
Method to test the statistic reasoning of a line out two uncertain planes.

Parameters:
plane1 - - the first plane
plane2 - - the second plane to be intersected with the first one
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 if the Jacobian look like they should according to documentation (sugr handbook) and if they do what they should.


testGetDofOfRelation

public void testGetDofOfRelation()
Test for getDofOfRelation()


testNormalizeEuclidean

public void testNormalizeEuclidean()
Test for normailzeEuclidean. first tests if the method works for "sure" lines without covs then tests if the cov-matrix gets normalized correctly


testGetDistance

public void testGetDistance()
Test for getDistance() Calculates distance between one million points and lines


testLine_3DVectorMatrix

public void testLine_3DVectorMatrix()
Test for void Line_3D(Vector, Matrix)


testLine_3Ddoubledoubledoubledoubledoubledouble

public void testLine_3Ddoubledoubledoubledoubledoubledouble()
Test for void Line_3D(double, double, double, double, double, double)


testLine_3DdoubledoubledoubledoubledoubledoubleMatrix

public void testLine_3DdoubledoubledoubledoubledoubledoubleMatrix()
Test for void Line_3D(double, double, double, double, double, double, Matrix)


testLine_3DdoubledoubledoubledoubledoubledoubleMatrixboolean

public void testLine_3DdoubledoubledoubledoubledoubledoubleMatrixboolean()
Test for void Line_3D(double, double, double, double, double, double, Matrix, boolean)


testLine_3DPlane_3DPlane_3D

public void testLine_3DPlane_3DPlane_3D()
Test for Line_3D(Plane_3D, Plane_3D) That means construct a Line_3D out of two Planes.


testLine_3DPoint_3DPoint_3D

public void testLine_3DPoint_3DPoint_3D()
Test for Line_3D(Point_3D, Point_3D) That means construct a Line_3D out of two points.


testLine_3D

public void testLine_3D()
Test for void Line_3D()


testCheckPlueckerCondition

public void testCheckPlueckerCondition()
Test for checkPlueckerCondition() Tests with two lines. For the first line condition is not fulfilled so method should fail, the second fulfills condition, so it must not fail.


testGetDual

public void testGetDual()
Test for getDual() Tests calculation of the dual over one million points includes test for error propagation


testCopy

public void testCopy()
Test for copy() Just copys a line, then changes original to test whether it does a deep copy or not.


testGammaDualVector

public void testGammaDualVector()
Test for Matrix GammaDual(Vector) Lets sugr calculate gamma dual then calculates the matrix and controls the results


testGammaDual

public void testGammaDual()
Test for Matrix GammaDual() Does the same as testGammaDual(Vector).


testGammaVector

public void testGammaVector()
Test for Matrix Gamma(Vector)


testGamma

public void testGamma()
Test for Matrix Gamma()


testGetLineLineJacobian

public void testGetLineLineJacobian()
Test getLineLineJacobian(), used to calculate the jacobian for equaltest between two lines.


testJGamma

public void testJGamma()
Tests if JGamma is calculated properly Tests Matrix value by value, then tests if it fullfills vec(GammaDual(L) = JGamma*C*L for a L. then tests if JGamma is usefull to calculate if two lines are equal, as shown in dissertation


testDualMatrixC

public void testDualMatrixC()
Tests if the Matrix C is "calculated" properly


testGetDistanceToOrigin

public void testGetDistanceToOrigin()
Tests getDistanceToOrigin() over one million points uses the general formular for distance to points.