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 double
distance(java.util.Vector<java.lang.Double> obj1, java.util.Vector<java.lang.Double> obj2)
The distance between the two object, i.e.double
distance(ProbabilityFunction<T> prob1, ProbabilityFunction<T> prob2)
Term
distanceTerm(java.util.Vector<Term> obj1, java.util.Vector<Term> obj2)
The distance between the two objects as a term.Term
distanceTerm(Term[] obj1, Term[] obj2)
The distance between the two objects as a term.double
norm(java.util.Vector<java.lang.Double> obj)
Returns the norm of the given objectdouble
norm(ProbabilityFunction<T> prob)
Term
normTerm(java.util.Vector<Term> obj)
Returns the norm as a term of the given termsTerm
normTerm(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:Norm
Returns the norm of the given object
-
norm
public double norm(ProbabilityFunction<T> prob)
-
normTerm
public Term normTerm(Term[] obj)
Description copied from interface:RealVectorNorm
Returns the norm as a term of the given terms- Specified by:
normTerm
in interfaceRealVectorNorm
- Parameters:
obj
- some term array- Returns:
- the term of the norm
-
distanceTerm
public Term distanceTerm(Term[] obj1, Term[] obj2)
Description copied from interface:RealVectorNorm
The distance between the two objects as a term.- Specified by:
distanceTerm
in 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:Norm
The 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:RealVectorNorm
Returns the norm as a term of the given terms- Specified by:
normTerm
in 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:RealVectorNorm
The distance between the two objects as a term.- Specified by:
distanceTerm
in interfaceRealVectorNorm
- Parameters:
obj1
- some termsobj2
- some terms- Returns:
- the distance between the two objects as a term
-
-