|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsugr.Relation
class which contains methods to test two elements
Field Summary | |
protected double |
alpha
Represents significance niveau. this is a start value, you may change this |
private static double |
C0
Represents values for the chiČ-Test |
private static double |
C1
|
private static double |
C2
|
protected double |
chi2
Represents the result of the chiČ-Test |
protected boolean |
condition
If true, the entities are conditioned prior to the testing TODO: The conditioning does not work! |
protected Vector |
d
Represents the non-squared, non-normalized test value. |
private static double |
D1
|
private static double |
D2
|
private static double |
D3
|
private BiRelationalProperty |
rprop
The first part and the type of the relation. |
private Entity |
second
The second part of the relation. |
protected Matrix |
Sigma
Represents the covariance matrix of the non-squared, non-normalized test value d. |
protected double |
t
Represents test value t = d^T %SIGMA_dd^+ d (see skript for more information) |
Constructor Summary | |
Relation(BiRelationalProperty _rprop,
Entity _second)
Constructs a concrete relation. |
|
Relation(BiRelationalProperty _rprop,
Entity _second,
boolean doConditioning)
Constructs a concrete relation. |
|
Relation(Entity _first,
Entity _second,
java.lang.Class relationType)
Constructs a concrete relation. |
|
Relation(Entity _first,
Entity _second,
java.lang.Class relationType,
boolean doConditioning)
Constructs a concrete relation. |
Method Summary | |
private void |
createRelationalProperty(Entity _first,
java.lang.Class _second,
java.lang.Class relationType)
Create the relational property out of an entity and a relation type |
boolean |
decision()
returns true if a relation between two elements (e.g l||m ) holds, and false if not |
protected void |
doTesting(boolean condition)
This is the main routine. it tests two entities wether a given relation hold or not. |
double |
getAlpha()
returns the significance niveau |
static double |
getChiSquareDistributionValue(double _alpha,
int dof)
this calls the chiČ-routine. |
boolean |
getCondition()
Return if conditioning is on. |
Vector |
getD()
returns the non-squared, non-normalized test value |
Matrix |
getSigma()
returns the covariance matrix of d |
void |
setAlpha(double _alpha)
sets the significance niveau. must be between 0 and 1 |
void |
setCondition(boolean doConditioning)
Set whether conditioning should be done. |
double |
testThreshold()
returns chiČ-testvalue |
double |
testValue()
returns the testvalue t= d^t SIGMA_dd^+ d [see sugr-handbook p.17: "Statistically testing uncertain geometric relations", Ver2] |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private BiRelationalProperty rprop
private Entity second
protected double t
Represents test value t = d^T %SIGMA_dd^+ d (see skript for more information)
private static final double C0
Represents values for the chiČ-Test
private static final double C1
private static final double C2
private static final double D1
private static final double D2
private static final double D3
protected double chi2
Represents the result of the chiČ-Test
protected double alpha
Represents significance niveau. this is a start value, you may change this
protected boolean condition
protected Vector d
protected Matrix Sigma
Constructor Detail |
public Relation(Entity _first, Entity _second, java.lang.Class relationType) throws java.lang.IllegalArgumentException
Constructs a concrete relation.
_first
- the first entity of the relation
_second
- the second entity of the relation
relationType
- the type of the Relation (a derived class from
BiRelationalProperty
public Relation(Entity _first, Entity _second, java.lang.Class relationType, boolean doConditioning) throws java.lang.IllegalArgumentException
Constructs a concrete relation.
_first
- the first entity of the relation
_second
- the second entity of the relation
relationType
- the type of the Relation (a derived class from
BiRelationalPropertydoConditioning
- if true, conditioning is done.
public Relation(BiRelationalProperty _rprop, Entity _second)
_rprop
- a relational property which consists of
the first entity of the relation and (inclusivly) the
type of the relation._second
- the second entity of the relationpublic Relation(BiRelationalProperty _rprop, Entity _second, boolean doConditioning)
_rprop
- a relational property which consists of
the first entity of the relation and (inclusivly) the
type of the relation._second
- the second entity of the relationdoConditioning
- if true, conditioning is done.Method Detail |
public boolean decision()
returns true if a relation between two elements (e.g l||m ) holds, and false if not
public double testValue()
returns the testvalue t= d^t SIGMA_dd^+ d [see sugr-handbook p.17: "Statistically testing uncertain geometric relations", Ver2]
public static double getChiSquareDistributionValue(double _alpha, int dof)
this calls the chiČ-routine. Implemented after Stephan Heuels Perl:sugr [Basic.pm, line 686 ff]
_alpha
- significance niveaudof
- degrees of freedom
public double getAlpha()
returns the significance niveau
public void setAlpha(double _alpha)
sets the significance niveau. must be between 0 and 1
_alpha
- sets the new alpha-value
public void setCondition(boolean doConditioning)
doConditioning
- if true, conditioning is done.public boolean getCondition()
public double testThreshold()
returns chiČ-testvalue
public Vector getD()
returns the non-squared, non-normalized test value
public Matrix getSigma()
returns the covariance matrix of d
protected void doTesting(boolean condition)
This is the main routine. it tests two entities wether a given relation hold or not. This method should be called in every constructor of this class and of derived classes.
private void createRelationalProperty(Entity _first, java.lang.Class _second, java.lang.Class relationType) throws java.lang.IllegalArgumentException
_first
- Entity_second
- type of the second Entity.relationType
- the type of the relation.
java.lang.IllegalArgumentException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |