Package org.tweetyproject.math.norm
Class ProbabilisticPNorm
java.lang.Object
org.tweetyproject.math.norm.ProbabilisticPNorm
- All Implemented Interfaces:
Serializable,Norm<Vector<Double>>,RealVectorNorm
This class implement the p-norm distance function where distances are normalized
corresponding to their distance to 0.5.
- Author:
- Matthias Thimm
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProbabilisticPNorm(int p, int c) Creates a new p-norm distance function where distances are normalized. -
Method Summary
Modifier and TypeMethodDescriptiondoubleThe distance between the two object, i.e.distanceTerm(Vector<Term> obj1, Vector<Term> obj2) The distance between the two objects as a term.distanceTerm(Term[] obj1, Term[] obj2) The distance between the two objects as a term.booleaninthashCode()doubleReturns the norm of the given objectReturns the norm as a term of the given termsReturns the norm as a term of the given termstoString()
-
Constructor Details
-
ProbabilisticPNorm
public ProbabilisticPNorm(int p, int c) Creates a new p-norm distance function where distances are normalized.- Parameters:
p- the parameter for the p-norm.c- the parameter of the normalization.
-
-
Method Details
-
distance
Description copied from interface:NormThe distance between the two object, i.e. the norm of the difference vector. -
toString
-
hashCode
-
equals
-
norm
-
normTerm
Description copied from interface:RealVectorNormReturns the norm as a term of the given terms- Specified by:
normTermin interfaceRealVectorNorm- Parameters:
obj- some term vector- Returns:
- the term of the norm
-
normTerm
Description copied from interface:RealVectorNormReturns the norm as a term of the given terms- Specified by:
normTermin interfaceRealVectorNorm- Parameters:
obj- some term array- Returns:
- the term of the norm
-
distanceTerm
Description copied from interface:RealVectorNormThe distance between the two objects as a term.- Specified by:
distanceTermin interfaceRealVectorNorm- Parameters:
obj1- some termsobj2- some terms- Returns:
- the distance between the two objects as a term
-
distanceTerm
Description copied from interface:RealVectorNormThe distance between the two objects as a term.- Specified by:
distanceTermin interfaceRealVectorNorm- Parameters:
obj1- some termsobj2- some terms- Returns:
- the distance between the two objects as a term
-