S
- Type of the space.public interface Vector<S extends Space> extends Serializable
Modifier and Type | Method and Description |
---|---|
Vector<S> |
add(double factor,
Vector<S> v)
Add a scaled vector to the instance.
|
Vector<S> |
add(Vector<S> v)
Add a vector to the instance.
|
double |
distance(Vector<S> v)
Compute the distance between the instance and another vector according to the L2 norm.
|
double |
distance1(Vector<S> v)
Compute the distance between the instance and another vector according to the L1 norm.
|
double |
distanceInf(Vector<S> v)
Compute the distance between the instance and another vector according to the L∞ norm.
|
double |
distanceSq(Vector<S> v)
Compute the square of the distance between the instance and another vector.
|
double |
dotProduct(Vector<S> v)
Compute the dot-product of the instance and another vector.
|
double |
getNorm()
Get the L2 norm for the vector.
|
double |
getNorm1()
Get the L1 norm for the vector.
|
double |
getNormInf()
Get the L∞ norm for the vector.
|
double |
getNormSq()
Get the square of the norm for the vector.
|
RealVector |
getRealVector()
Get a RealVector with identical data.
|
Space |
getSpace()
Get the space to which the vector belongs.
|
Vector<S> |
getZero()
Get the null vector of the vectorial space or origin point of the affine space.
|
boolean |
isInfinite()
Returns true if any coordinate of this vector is infinite and none are NaN;
false otherwise
|
boolean |
isNaN()
Returns true if any coordinate of this vector is NaN; false otherwise
|
Vector<S> |
negate()
Get the opposite of the instance.
|
Vector<S> |
normalize()
Get a normalized vector aligned with the instance.
|
Vector<S> |
scalarMultiply(double a)
Multiply the instance by a scalar.
|
Vector<S> |
subtract(double factor,
Vector<S> v)
Subtract a scaled vector from the instance.
|
Vector<S> |
subtract(Vector<S> v)
Subtract a vector from the instance.
|
String |
toString(NumberFormat format)
Get a string representation of this vector.
|
Space getSpace()
Vector<S> getZero()
double getNorm1()
double getNorm()
double getNormSq()
double getNormInf()
Vector<S> add(Vector<S> v)
v
- vector to addVector<S> add(double factor, Vector<S> v)
factor
- scale factor to apply to v before adding itv
- vector to addVector<S> subtract(Vector<S> v)
v
- vector to subtractVector<S> subtract(double factor, Vector<S> v)
factor
- scale factor to apply to v before subtracting itv
- vector to subtractVector<S> negate()
Vector<S> normalize()
MathArithmeticException
- if the norm is zeroVector<S> scalarMultiply(double a)
a
- scalarboolean isNaN()
boolean isInfinite()
double distance1(Vector<S> v)
Calling this method is equivalent to calling: q.subtract(p).getNorm1()
except that no intermediate
vector is built
v
- second vectordouble distance(Vector<S> v)
Calling this method is equivalent to calling: q.subtract(p).getNorm()
except that no intermediate
vector is built
v
- second vectordouble distanceInf(Vector<S> v)
Calling this method is equivalent to calling: q.subtract(p).getNormInf()
except that no intermediate
vector is built
v
- second vectordouble distanceSq(Vector<S> v)
Calling this method is equivalent to calling: q.subtract(p).getNormSq()
except that no intermediate
vector is built
v
- second vectordouble dotProduct(Vector<S> v)
v
- second vectorRealVector getRealVector()
RealVector
String toString(NumberFormat format)
format
- the custom format for componentsCopyright © 2021 CNES. All rights reserved.