Package net.sf.tweety.math.norm
Class ProbabilisticPNorm
- java.lang.Object
-
- net.sf.tweety.math.norm.ProbabilisticPNorm
-
- All Implemented Interfaces:
Serializable,Norm<Vector<Double>>,RealVectorNorm
public class ProbabilisticPNorm extends Object implements RealVectorNorm, Serializable
This class implement the p-norm distance function where distances are normalized corresponding to their distance to 0.5.- Author:
- Matthias Thimm
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProbabilisticPNorm(int p, int c)Creates a new p-norm distance function where distances are normalized.
-
Method Summary
Modifier and Type Method Description doubledistance(Vector<Double> l1, Vector<Double> l2)The distance between the two object, i.e.TermdistanceTerm(Vector<Term> obj1, Vector<Term> obj2)The distance between the two objects as a term.TermdistanceTerm(Term[] obj1, Term[] obj2)The distance between the two objects as a term.booleanequals(Object obj)inthashCode()doublenorm(Vector<Double> obj)Returns the norm of the given objectTermnormTerm(Vector<Term> obj)Returns the norm as a term of the given termsTermnormTerm(Term[] obj)Returns the norm as a term of the given termsStringtoString()
-
-
-
Method Detail
-
distance
public double distance(Vector<Double> l1, Vector<Double> l2)
Description copied from interface:NormThe distance between the two object, i.e. the norm of the difference vector.
-
norm
public double norm(Vector<Double> obj)
Description copied from interface:NormReturns the norm of the given object
-
normTerm
public Term normTerm(Vector<Term> obj)
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
public Term normTerm(Term[] obj)
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
public Term distanceTerm(Vector<Term> obj1, Vector<Term> obj2)
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
public Term distanceTerm(Term[] obj1, Term[] obj2)
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
-
-