net.sf.tweety.math.norm

## Class EntropyNorm<T extends java.lang.Comparable<T>>

• 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 and Description
`EntropyNorm()`
• ### Method Summary

All Methods
Modifier and Type Method and Description
`double` ```distance(ProbabilityFunction<T> prob1, ProbabilityFunction<T> prob2)```
`double` ```distance(java.util.Vector<java.lang.Double> obj1, java.util.Vector<java.lang.Double> obj2)```
The distance between the two object, i.e.
`Term` ```distanceTerm(Term[] obj1, Term[] obj2)```
The distance between the two objects as a term.
`Term` ```distanceTerm(java.util.Vector<Term> obj1, java.util.Vector<Term> obj2)```
The distance between the two objects as a term.
`double` `norm(ProbabilityFunction<T> prob)`
`double` `norm(java.util.Vector<java.lang.Double> obj)`
Returns the norm of the given object
`Term` `normTerm(Term[] obj)`
Returns the norm as a term of the given terms
`Term` `normTerm(java.util.Vector<Term> obj)`
Returns the norm as a term of the given terms
• ### Methods inherited from class net.sf.tweety.math.func.EntropyFunction

`eval, getTerm`
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

• #### EntropyNorm

`public EntropyNorm()`
• ### 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
Specified by:
`norm` in interface `Norm<java.util.Vector<java.lang.Double>>`
Parameters:
`obj` - some object
Returns:
the norm of the 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 interface `RealVectorNorm`
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 interface `RealVectorNorm`
Parameters:
`obj1` - some terms
`obj2` - 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.
Specified by:
`distance` in interface `Norm<java.util.Vector<java.lang.Double>>`
Parameters:
`obj1` - some object
`obj2` - some object
Returns:
the distance between the two objects
• #### 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 interface `RealVectorNorm`
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 interface `RealVectorNorm`
Parameters:
`obj1` - some terms
`obj2` - some terms
Returns:
the distance between the two objects as a term