Class EntropyNorm<T extends java.lang.Comparable<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 object
      double norm​(ProbabilityFunction<T> prob)  
      Term normTerm​(java.util.Vector<Term> obj)
      Returns the norm as a term of the given terms
      Term normTerm​(Term[] obj)
      Returns the norm as a term of the given terms
      • Methods inherited from class java.lang.Object

        equals, 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<T extends java.lang.Comparable<T>>
        Parameters:
        obj - some object
        Returns:
        the norm of the object
      • 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<T extends java.lang.Comparable<T>>
        Parameters:
        obj1 - some object
        obj2 - some object
        Returns:
        the distance between the two objects
      • 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