Class ProbabilisticAggregatingNorm

java.lang.Object
org.tweetyproject.math.norm.ProbabilisticAggregatingNorm
All Implemented Interfaces:
Serializable, Norm<Vector<Double>>, RealVectorNorm

public class ProbabilisticAggregatingNorm extends Object implements RealVectorNorm, Serializable
This distance function uses an aggregator on a probabilistically normalized distance for probabilities of each value.
Author:
Matthias Thimm
See Also:
  • Constructor Details

    • ProbabilisticAggregatingNorm

      public ProbabilisticAggregatingNorm(AggregationFunction aggregator, int weight)
      Creates a new distance function with the given aggregator.
      Parameters:
      aggregator - some aggregation function.
      weight - a parameter for adjusting the aggregation.
  • Method Details

    • distance

      public double distance(Vector<Double> l1, Vector<Double> l2)
      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<Vector<Double>>
      Parameters:
      l1 - some object
      l2 - some object
      Returns:
      the distance between the two objects
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • norm

      public double norm(Vector<Double> obj)
      Description copied from interface: Norm
      Returns the norm of the given object
      Specified by:
      norm in interface Norm<Vector<Double>>
      Parameters:
      obj - some object
      Returns:
      the norm of the object
    • normTerm

      public Term normTerm(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
    • 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(Vector<Term> obj1, 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
    • 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