sugr
Class BiRelationalProperty

java.lang.Object
  extended bysugr.BiRelationalProperty
All Implemented Interfaces:
java.lang.Cloneable, RelationalProperty
Direct Known Subclasses:
Equal, Incident, Orthogonal, Parallel

public abstract class BiRelationalProperty
extends java.lang.Object
implements RelationalProperty

class representing a relational property which is a non concrete relation between an existing entity and a second entity wich does NOT exist yet. (a "target" entity). Possible relations are represented in derived classes (Equal, Incident, Orthogonal, Parallel)

Author:
Thomas Laebe, ipb

Field Summary
protected  Entity first
           Represents the first entity of the binary relation
protected  java.lang.Class secondEntityType
          Represents the type of the second entity.
 
Constructor Summary
BiRelationalProperty(Entity _first, java.lang.Class _secondEntityType)
          Create a new relational Property.
 
Method Summary
 void changeNullspace()
          Changes the nullspace for all entities
 java.lang.Object clone()
          Clone a relational property.
static double[] doCondition(RelationalProperty[] rprops)
          Do conditioning of the observations.
static void doCondition(RelationalProperty[] rprops, double[] f)
          Do conditioning of the observations.
 void ensureConstraints()
          Ensures, that all elements fulfill their constraints
abstract  Matrix getCovarianceOfJacobianRow(int row)
           Returns the Covariance Matrix of the row-vector of the Jacobian Matrix A of the first Entity and the relation type.
 Matrix getCovarianceOfObservations()
          The the covariance matrix of the observation of that relation.
abstract  int getDof()
           Compute degrees of freedom of that Relation
 Entity getFirstEntity()
          Get the first part of the relation.
abstract  Matrix getJacobian()
           Return Jacobian Matrix A of the first Entity and the relation type.
 Matrix getJacobianOfObservationConstraints()
          Get the Jacobian of the constraint of the observation
 Vector getObservations()
          Get observation of that relation.
 Matrix getReducedCovarianceOfObservations()
          The "reduced" covariance matrix of the observations which takes care of the homogeneous constraint.
 java.lang.Class getTargetType()
          Get the type of the second entity
 Vector getValueOfObservationConstraints()
          Get the value of the constraint of the observation
 void setObservations(Vector v)
          Set observations of that relation (as a stacked vector).
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

first

protected Entity first

Represents the first entity of the binary relation


secondEntityType

protected java.lang.Class secondEntityType
Represents the type of the second entity.

Constructor Detail

BiRelationalProperty

public BiRelationalProperty(Entity _first,
                            java.lang.Class _secondEntityType)
Create a new relational Property. Can be used (only) by derived classes.

Parameters:
_first - first Entity
_secondEntityType - type of second Entity
Method Detail

getJacobian

public abstract Matrix getJacobian()

Return Jacobian Matrix A of the first Entity and the relation type.

Specified by:
getJacobian in interface RelationalProperty
Returns:
Jacobian Matrix A


getDof

public abstract int getDof()

Compute degrees of freedom of that Relation

Specified by:
getDof in interface RelationalProperty
Returns:
degrees of freedom of that Relation

* Return Matrix A of the first Entity and the relation

getCovarianceOfJacobianRow

public abstract Matrix getCovarianceOfJacobianRow(int row)

Returns the Covariance Matrix of the row-vector of the Jacobian Matrix A of the first Entity and the relation type.

Specified by:
getCovarianceOfJacobianRow in interface RelationalProperty
Parameters:
row - Row vector, for which the Covariance matrix is to be returned
Returns:
covariance of the row vector of the jacobian

getFirstEntity

public Entity getFirstEntity()
Get the first part of the relation.

Returns:
the first part of the relation

getTargetType

public java.lang.Class getTargetType()
Get the type of the second entity

Specified by:
getTargetType in interface RelationalProperty
Returns:
the second entity type

clone

public java.lang.Object clone()
Clone a relational property. The Entity and the class type of the second entity are cloned.

Specified by:
clone in interface RelationalProperty
Returns:
a copy of the element.

getObservations

public Vector getObservations()
Get observation of that relation. This is per default the value of the first entity. Used for estimation.

Specified by:
getObservations in interface RelationalProperty
Returns:
the observation for that relation

setObservations

public void setObservations(Vector v)
Set observations of that relation (as a stacked vector). For a binary relation this is setting the vector of the first element.

Specified by:
setObservations in interface RelationalProperty

getJacobianOfObservationConstraints

public Matrix getJacobianOfObservationConstraints()
Description copied from interface: RelationalProperty
Get the Jacobian of the constraint of the observation

Specified by:
getJacobianOfObservationConstraints in interface RelationalProperty
Returns:
Matrix G

getValueOfObservationConstraints

public Vector getValueOfObservationConstraints()
Description copied from interface: RelationalProperty
Get the value of the constraint of the observation

Specified by:
getValueOfObservationConstraints in interface RelationalProperty
Returns:
Matrix g0

doCondition

public static double[] doCondition(RelationalProperty[] rprops)
Do conditioning of the observations.

Parameters:
rprops - a set of Bi(!)RelationalProperties. RelationalProperty is used for compatibility reasons.
Returns:
the conditioning factor (as one element array, for compatibility reasons)

doCondition

public static void doCondition(RelationalProperty[] rprops,
                               double[] f)
Do conditioning of the observations.

Parameters:
f - the conditioning factor (as one element array, for compatibility reasons)
rprops - a set of Bi(!)RelationalProperties. RelationalProperty is used for compatibility reasons.

getCovarianceOfObservations

public Matrix getCovarianceOfObservations()
The the covariance matrix of the observation of that relation. This is per default the covariance of the first entity. Used for estimation.

Specified by:
getCovarianceOfObservations in interface RelationalProperty
Returns:
the covariance of the observations.

getReducedCovarianceOfObservations

public Matrix getReducedCovarianceOfObservations()
The "reduced" covariance matrix of the observations which takes care of the homogeneous constraint. This is needed to obtain a coherent covariance of the corrected observation from the inner loop of the estimation, see note of WF from May 2005.

Specified by:
getReducedCovarianceOfObservations in interface RelationalProperty
Returns:
the covariance of the observations.

ensureConstraints

public void ensureConstraints()
Description copied from interface: RelationalProperty
Ensures, that all elements fulfill their constraints

Specified by:
ensureConstraints in interface RelationalProperty

changeNullspace

public void changeNullspace()
Description copied from interface: RelationalProperty
Changes the nullspace for all entities

Specified by:
changeNullspace in interface RelationalProperty