public class PNorm extends AbstractRealVectorNorm
Modifier and Type | Field and Description |
---|---|
private int |
p
The parameter of this p-norm.
|
Constructor and Description |
---|
PNorm(int p)
Creates a new p-norm with the given parameter.
|
Modifier and Type | Method and 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
|
distanceTerm, normTerm
public PNorm(int p)
p
- the parameter of this p-norm.public double norm(java.util.Vector<java.lang.Double> obj)
Norm
obj
- some objectpublic double distance(java.util.Vector<java.lang.Double> obj1, java.util.Vector<java.lang.Double> obj2)
Norm
obj1
- some objectobj2
- some objectpublic Term normTerm(java.util.Vector<Term> obj)
RealVectorNorm
normTerm
in interface RealVectorNorm
normTerm
in class AbstractRealVectorNorm
obj
- some term vectorpublic Term distanceTerm(java.util.Vector<Term> obj1, java.util.Vector<Term> obj2)
RealVectorNorm
distanceTerm
in interface RealVectorNorm
distanceTerm
in class AbstractRealVectorNorm
obj1
- some termsobj2
- some terms