Package net.sf.tweety.math.norm
Class EntropyNorm<T extends java.lang.Comparable<T>>
- java.lang.Object
-
- net.sf.tweety.math.func.EntropyFunction
-
- net.sf.tweety.math.norm.EntropyNorm<T>
-
- Type Parameters:
T- The class of the objects used.
- All Implemented Interfaces:
SimpleFunction<java.util.Vector<java.lang.Double>,java.lang.Double>,SimpleRealValuedFunction,Norm<java.util.Vector<java.lang.Double>>,RealVectorNorm
public class EntropyNorm<T extends java.lang.Comparable<T>> extends EntropyFunction implements RealVectorNorm
The entropy norm. Uses the entropy of a vector of doubles (=probability function) as a measure of norm and the relative entropy of two probability distributions as distance. Note that entropy is not actually a norm!- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description EntropyNorm()
-
Method Summary
Modifier and Type Method Description doubledistance(java.util.Vector<java.lang.Double> obj1, java.util.Vector<java.lang.Double> obj2)The distance between the two object, i.e.doubledistance(ProbabilityFunction<T> prob1, ProbabilityFunction<T> prob2)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.doublenorm(java.util.Vector<java.lang.Double> obj)Returns the norm of the given objectdoublenorm(ProbabilityFunction<T> prob)TermnormTerm(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 terms-
Methods inherited from class net.sf.tweety.math.func.EntropyFunction
eval, getTerm
-
-
-
-
Method Detail
-
norm
public double norm(java.util.Vector<java.lang.Double> obj)
Description copied from interface:NormReturns the norm of the given object
-
norm
public double norm(ProbabilityFunction<T> prob)
-
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(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
-
distance
public double distance(java.util.Vector<java.lang.Double> obj1, java.util.Vector<java.lang.Double> obj2)Description copied from interface:NormThe distance between the two object, i.e. the norm of the difference vector.
-
distance
public double distance(ProbabilityFunction<T> prob1, ProbabilityFunction<T> prob2)
-
normTerm
public Term normTerm(java.util.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
-
distanceTerm
public 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 interfaceRealVectorNorm- Parameters:
obj1- some termsobj2- some terms- Returns:
- the distance between the two objects as a term
-
-