sugr
Class Point_2D

java.lang.Object
  extended bysugr.Element
      extended bysugr.Entity
          extended bysugr.Object_2D
              extended bysugr.Point_2D
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Point_2D
extends Object_2D

Implementation of Point_2D

Version:
1.1 (25.1.2004) Changed Constructor Point_2D(Line,Line) changed to not use Construction Class anymore. Calculation is now done in Constructor itself.
Author:
Norbert Fischer
See Also:
Serialized Form

Field Summary
private static int DIM
           
private static int DOF
           
private static long serialVersionUID
          Class version number for serialization
 
Fields inherited from class sugr.Element
cov, MAXITER, v
 
Constructor Summary
Point_2D()
          default constructor
Point_2D(double x, double y)
          Constructor for a euclidean point. homogeneous part is set to 1, covariance matrix is set to 0
Point_2D(double u, double v, double w)
          Sets all elements of point directly.
Point_2D(double x, double y, double sigma_x, double sigma_y)
          Construct a Point with known accuracies for x and y.
Point_2D(double u, double v, double w, Matrix cov)
          Sets all elements of point directly.
Point_2D(double x, double y, Matrix cov)
          Constructor for a euclidean point with covariance. homogeneous part is set to 1.
Point_2D(Line_2D l, Line_2D m)
          constructs a new point_2D by an intersection between two lines.
Point_2D(RelationalProperty[] rprops)
          Estimates a new Point
Point_2D(Vector _v, Matrix _cov)
          Constructor for a new Point_2D
 
Method Summary
 Point_2D copy()
          returns a copy of this point.
protected  Matrix getConditionMatrix(double f)
          Get a matrix W(f) for conditioning.
 Matrix getCovarianceOfJacobianRowOfRelation(java.lang.Class relationType, java.lang.Class partnerType, int row)
          Return Covariance of a Row of the Jacobian Matrix of that entity in combination with a relation.
 int getDegreesOfFreedom()
          returns dof=2 of this point
 int getDimension()
          returns dimension=3 for this point
 double getDistance(Entity e)
          Compute the (euclidean) distance to another entity.
 int getDofOfRelation(java.lang.Class relationType, java.lang.Class partnerType)
           Compute degrees of freedom of a relation.
 Vector getEuclideanPart()
          returns the euclidean part of this point
 Vector getHomogeneousPart()
          returns the homogeneous part of this plane
 Matrix getJacobianOfRelation(java.lang.Class relationType, java.lang.Class partnerType)
          Return Jacobian Matrix of that entity in combination with a relation.
 void normalizeEuclidean()
          normalizes in that way, that the homogeneous part will be 1
 Matrix SkewSym()
          Returns the skew symmetric matrix of this point
static Matrix SkewSym(Vector v)
          Returns the skew symmetric matrix of a 3x1 vector.
 
Methods inherited from class sugr.Entity
doCondition, doCondition, doCondition, ensureConstraintsWithoutIteration, getConditionFactorF, getConditionFactorF, getDistanceToOrigin, getJacobianOfRelation, getNormOfEuclideanPart, getNormOfHomogeneousPart, isEqual, isIncident, isOrthogonal, isParallel, normalizeEuclideanComparable, transform
 
Methods inherited from class sugr.Element
approximate, calcCov, changeNullspace, changeNullspace, checkCovDim, checkElement, clone, ensureConstraints, estimate, estimate, gaussHelmertIterations, gaussHelmertIterationsOld, getConstraintValue, getCov, getJacobianOfConstraint, getReducedAB, getV, normalizeSphere, normalizeSphereComparable, print, print, reduceFirstMatrix, reduceMatrix, reduceMatrix, setCov, setV, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Class version number for serialization

See Also:
Constant Field Values

DIM

private static final int DIM
See Also:
Constant Field Values

DOF

private static final int DOF
See Also:
Constant Field Values
Constructor Detail

Point_2D

public Point_2D(Vector _v,
                Matrix _cov)
Constructor for a new Point_2D

Parameters:
_v - a Vector with dimension 3. Contains the coordinates of the new Line_2D
_cov - 3x3 covariance matrix

Point_2D

public Point_2D(double x,
                double y)
Constructor for a euclidean point. homogeneous part is set to 1, covariance matrix is set to 0

Parameters:
x - x-part of point
y - y-part of point

Point_2D

public Point_2D(double x,
                double y,
                Matrix cov)
Constructor for a euclidean point with covariance. homogeneous part is set to 1.

Parameters:
x - x-part of point
y - y-part of point
cov - 3x3 Matrix

Point_2D

public Point_2D(double u,
                double v,
                double w)
Sets all elements of point directly. Covariance is set to 0


Point_2D

public Point_2D(double u,
                double v,
                double w,
                Matrix cov)
Sets all elements of point directly. With Covariance.

Parameters:
cov - 3x3 Matrix

Point_2D

public Point_2D(double x,
                double y,
                double sigma_x,
                double sigma_y)
Construct a Point with known accuracies for x and y. If you have the 2 coordinates of a 2D-Point and accuracies for these two coordinates (ignoring correlations) then you can use this (shortcut) constructor to generate a SUGR-Point with covariance matrix. The generated covariance is | sigma_x^2 0 0| | 0 sigma_y^2 0| | 0 0 0| and the homogeneous part is set to 1.

Parameters:
x - first coordinate of point
y - second coordinate of point
sigma_x - accuracy of x (standard deviation)
sigma_y - accuracy of y (standard deviation)

Point_2D

public Point_2D(Line_2D l,
                Line_2D m)
constructs a new point_2D by an intersection between two lines. Error propagation is done automatically

Parameters:
l - first Line_2D
m - second Line_2D

Point_2D

public Point_2D()
default constructor


Point_2D

public Point_2D(RelationalProperty[] rprops)
Estimates a new Point

Parameters:
rprops - an array of constraints.
Method Detail

getEuclideanPart

public Vector getEuclideanPart()
returns the euclidean part of this point

Specified by:
getEuclideanPart in class Entity
Returns:
a Vector with 2 elements

getHomogeneousPart

public Vector getHomogeneousPart()
returns the homogeneous part of this plane

Specified by:
getHomogeneousPart in class Entity
Returns:
a Vector with one element

getDistance

public double getDistance(Entity e)
Compute the (euclidean) distance to another entity. This is of course not possible for all combinations. In the case of an illegal combination an IllegalArgumentException should be thrown.

Specified by:
getDistance in class Entity
Parameters:
e - the entity to which a distance should be computed.
Returns:
the distance to the given entity

getConditionMatrix

protected Matrix getConditionMatrix(double f)
Get a matrix W(f) for conditioning. This matrix can be used to transform an entity to a conditioned one.

Specified by:
getConditionMatrix in class Entity
Parameters:
f - the conditioning factor
Returns:
the condition matrix

copy

public Point_2D copy()
returns a copy of this point. Actually it works like clone


getDimension

public int getDimension()
returns dimension=3 for this point

Specified by:
getDimension in class Element

getDegreesOfFreedom

public int getDegreesOfFreedom()
returns dof=2 of this point

Specified by:
getDegreesOfFreedom in class Entity

SkewSym

public static Matrix SkewSym(Vector v)
Returns the skew symmetric matrix of a 3x1 vector.

Returns:
3x3 Matrix with rank 2

SkewSym

public Matrix SkewSym()
Returns the skew symmetric matrix of this point

Returns:
3x3 Matrix with rank 2

normalizeEuclidean

public void normalizeEuclidean()
normalizes in that way, that the homogeneous part will be 1

Specified by:
normalizeEuclidean in class Entity

getJacobianOfRelation

public Matrix getJacobianOfRelation(java.lang.Class relationType,
                                    java.lang.Class partnerType)
                             throws java.lang.IllegalArgumentException
Return Jacobian Matrix of that entity in combination with a relation. If that entity is part of a relation then this relation has a constraint f(firstEntity)*secondEntity=g(secondEntity)*firstEntity=0. f and g are the Jacobians of these linear formulas. So return f or g (the choice f or g is given by the type of the entity !)

Specified by:
getJacobianOfRelation in class Entity
Parameters:
relationType - the type of the relation
partnerType - the type of the other partner in the relation
Returns:
Jacobian matrix (or part of the constraint formula)
Throws:
java.lang.IllegalArgumentException

getDofOfRelation

public int getDofOfRelation(java.lang.Class relationType,
                            java.lang.Class partnerType)
                     throws java.lang.IllegalArgumentException

Compute degrees of freedom of a relation.

Specified by:
getDofOfRelation in class Entity
Parameters:
relationType - the type of the relation
partnerType - the type of the other partner in the relation
Returns:
degrees of freedom for the relation

Throws:
java.lang.IllegalArgumentException

getCovarianceOfJacobianRowOfRelation

public Matrix getCovarianceOfJacobianRowOfRelation(java.lang.Class relationType,
                                                   java.lang.Class partnerType,
                                                   int row)
                                            throws java.lang.IllegalArgumentException
Return Covariance of a Row of the Jacobian Matrix of that entity in combination with a relation.

Specified by:
getCovarianceOfJacobianRowOfRelation in class Entity
Parameters:
relationType - the type of the relation
partnerType - the type of the other partner in the relation
Returns:
Covariance of the row of the Jacobian matrix
Throws:
java.lang.IllegalArgumentException