Package org.tweetyproject.math.norm
Class PNorm
java.lang.Object
org.tweetyproject.math.norm.AbstractRealVectorNorm
org.tweetyproject.math.norm.PNorm
- All Implemented Interfaces:
Norm<Vector<Double>>,RealVectorNorm
The p-norm.
- Author:
- Matthias Thimm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleThe distance between the two object, i.e.distanceTerm(Vector<Term> obj1, Vector<Term> obj2)The distance between the two objects as a term.doubleReturns the norm of the given objectReturns the norm as a term of the given termsMethods inherited from class org.tweetyproject.math.norm.AbstractRealVectorNorm
distanceTerm, normTerm
-
Constructor Details
-
PNorm
public PNorm(int p)Creates a new p-norm with the given parameter.- Parameters:
p- the parameter of this p-norm.
-
-
Method Details
-
norm
Description copied from interface:NormReturns the norm of the given object- Parameters:
obj- some object- Returns:
- the norm of the object
-
distance
Description copied from interface:NormThe distance between the two object, i.e. the norm of the difference vector.- Parameters:
obj1- some objectobj2- some object- Returns:
- the distance between the two objects
-
normTerm
Description copied from interface:RealVectorNormReturns the norm as a term of the given terms- Specified by:
normTermin interfaceRealVectorNorm- Specified by:
normTermin classAbstractRealVectorNorm- Parameters:
obj- some term vector- Returns:
- the term of the norm
-
distanceTerm
Description copied from interface:RealVectorNormThe distance between the two objects as a term.- Specified by:
distanceTermin interfaceRealVectorNorm- Specified by:
distanceTermin classAbstractRealVectorNorm- Parameters:
obj1- some termsobj2- some terms- Returns:
- the distance between the two objects as a term
-