Package org.tweetyproject.math.norm
Class ProbabilisticAggregatingNorm
- java.lang.Object
-
- org.tweetyproject.math.norm.ProbabilisticAggregatingNorm
-
- All Implemented Interfaces:
java.io.Serializable,Norm<java.util.Vector<java.lang.Double>>,RealVectorNorm
public class ProbabilisticAggregatingNorm extends java.lang.Object implements RealVectorNorm, java.io.Serializable
This distance function uses an aggregator on a probabilistically normalized distance for probabilities of each value.- Author:
- Matthias Thimm
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProbabilisticAggregatingNorm(AggregationFunction aggregator, int weight)Creates a new distance function with the given aggregator.
-
Method Summary
Modifier and Type Method Description doubledistance(java.util.Vector<java.lang.Double> l1, java.util.Vector<java.lang.Double> l2)The distance between the two object, i.e.TermdistanceTerm(java.util.Vector<Term> obj1, java.util.Vector<Term> obj2)The distance between the two objects as a term.TermdistanceTerm(Term[] obj1, Term[] obj2)The distance between the two objects as a term.doublenorm(java.util.Vector<java.lang.Double> obj)Returns the norm of the given objectTermnormTerm(java.util.Vector<Term> obj)Returns the norm as a term of the given termsTermnormTerm(Term[] obj)Returns the norm as a term of the given termsjava.lang.StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
distance
public double distance(java.util.Vector<java.lang.Double> l1, java.util.Vector<java.lang.Double> l2)Description copied from interface:NormThe distance between the two object, i.e. the norm of the difference vector.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
norm
public double norm(java.util.Vector<java.lang.Double> obj)
Description copied from interface:NormReturns the norm of the given object
-
normTerm
public Term normTerm(java.util.Vector<Term> obj)
Description copied from interface:RealVectorNormReturns the norm as a term of the given terms- Specified by:
normTermin interfaceRealVectorNorm- Parameters:
obj- some term vector- Returns:
- the term of the norm
-
normTerm
public Term normTerm(Term[] obj)
Description copied from interface:RealVectorNormReturns the norm as a term of the given terms- Specified by:
normTermin interfaceRealVectorNorm- Parameters:
obj- some term array- Returns:
- the term of the norm
-
distanceTerm
public Term distanceTerm(java.util.Vector<Term> obj1, java.util.Vector<Term> obj2)
Description copied from interface:RealVectorNormThe distance between the two objects as a term.- Specified by:
distanceTermin interfaceRealVectorNorm- Parameters:
obj1- some termsobj2- some terms- Returns:
- the distance between the two objects as a term
-
distanceTerm
public Term distanceTerm(Term[] obj1, Term[] obj2)
Description copied from interface:RealVectorNormThe distance between the two objects as a term.- Specified by:
distanceTermin interfaceRealVectorNorm- Parameters:
obj1- some termsobj2- some terms- Returns:
- the distance between the two objects as a term
-
-