Package net.sf.tweety.math.norm
Class ProbabilisticPNorm
- java.lang.Object
- 
- net.sf.tweety.math.norm.ProbabilisticPNorm
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- Norm<java.util.Vector<java.lang.Double>>,- RealVectorNorm
 
 public class ProbabilisticPNorm extends java.lang.Object implements RealVectorNorm, java.io.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 SummaryConstructors Constructor Description ProbabilisticPNorm(int p, int c)Creates a new p-norm distance function where distances are normalized.
 - 
Method SummaryModifier and Type Method Description doubledistance(java.util.Vector<java.lang.Double> l1, java.util.Vector<java.lang.Double> l2)The distance between the two object, i.e.TermdistanceTerm(java.util.Vector<Term> obj1, java.util.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(java.lang.Object obj)inthashCode()doublenorm(java.util.Vector<java.lang.Double> obj)Returns the norm of the given objectTermnormTerm(java.util.Vector<Term> obj)Returns the norm as a term of the given termsTermnormTerm(Term[] obj)Returns the norm as a term of the given termsjava.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
distancepublic double distance(java.util.Vector<java.lang.Double> l1, java.util.Vector<java.lang.Double> l2)Description copied from interface:NormThe distance between the two object, i.e. the norm of the difference vector.
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
normpublic double norm(java.util.Vector<java.lang.Double> obj) Description copied from interface:NormReturns the norm of the given object
 - 
normTermpublic Term normTerm(java.util.Vector<Term> obj) Description copied from interface:RealVectorNormReturns the norm as a term of the given terms- Specified by:
- normTermin interface- RealVectorNorm
- Parameters:
- obj- some term vector
- Returns:
- the term of the norm
 
 - 
normTermpublic Term normTerm(Term[] obj) Description copied from interface:RealVectorNormReturns the norm as a term of the given terms- Specified by:
- normTermin interface- RealVectorNorm
- Parameters:
- obj- some term array
- Returns:
- the term of the norm
 
 - 
distanceTermpublic Term distanceTerm(java.util.Vector<Term> obj1, java.util.Vector<Term> obj2) Description copied from interface:RealVectorNormThe distance between the two objects as a term.- Specified by:
- distanceTermin interface- RealVectorNorm
- Parameters:
- obj1- some terms
- obj2- some terms
- Returns:
- the distance between the two objects as a term
 
 - 
distanceTermpublic Term distanceTerm(Term[] obj1, Term[] obj2) Description copied from interface:RealVectorNormThe distance between the two objects as a term.- Specified by:
- distanceTermin interface- RealVectorNorm
- Parameters:
- obj1- some terms
- obj2- some terms
- Returns:
- the distance between the two objects as a term
 
 
- 
 
-