Class PNorm

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int p
      The parameter of this p-norm.
    • Constructor Summary

      Constructors 
      Constructor Description
      PNorm​(int p)
      Creates a new p-norm with the given parameter.
    • 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.
      Term distanceTerm​(java.util.Vector<Term> obj1, java.util.Vector<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
      Term normTerm​(java.util.Vector<Term> obj)
      Returns the norm as a term of the given terms
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • p

        private int p
        The parameter of this p-norm.
    • Constructor Detail

      • PNorm

        public PNorm​(int p)
        Creates a new p-norm with the given parameter.
        Parameters:
        p - the parameter of this p-norm.
    • 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
        Parameters:
        obj - some object
        Returns:
        the norm of the object
      • 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.
        Parameters:
        obj1 - some object
        obj2 - some object
        Returns:
        the distance between the two objects