T - the type of the field elementspublic interface FieldVector<T extends FieldElement<T>>
vector element indexing is 0-based -- e.g., getEntry(0) returns the first element of the vector.
The various mapXxx and mapXxxToSelf methods operate on vectors element-wise, i.e. they
perform the same operation (adding a scalar, applying a function ...) on each element in turn. The
mapXxx versions create a new vector to hold the result and do not change the instance. The
mapXxxToSelf versions use the instance itself to store the results, so the instance is changed by these
methods. In both cases, the result vector is returned by the methods, this allows to use the fluent API style,
like this:
RealVector result = v.mapAddToSelf(3.0).mapTanToSelf().mapSquareToSelf();
| Modifier and Type | Method and Description |
|---|---|
FieldVector<T> |
add(FieldVector<T> v)
Compute the sum of
this and v. |
FieldVector<T> |
append(FieldVector<T> v)
Construct a vector by appending a vector to this vector.
|
FieldVector<T> |
append(T d)
Construct a vector by appending a T to this vector.
|
FieldVector<T> |
copy()
Returns a (deep) copy of this.
|
T |
dotProduct(FieldVector<T> v)
Compute the dot product.
|
FieldVector<T> |
ebeDivide(FieldVector<T> v)
Element-by-element division.
|
FieldVector<T> |
ebeMultiply(FieldVector<T> v)
Element-by-element multiplication.
|
int |
getDimension()
Returns the size of the vector.
|
T |
getEntry(int index)
Returns the entry in the specified index.
|
Field<T> |
getField()
Get the type of field elements of the vector.
|
FieldVector<T> |
getSubVector(int index,
int n)
Get a subvector from consecutive elements.
|
FieldVector<T> |
mapAdd(T d)
Map an addition operation to each entry.
|
FieldVector<T> |
mapAddToSelf(T d)
Map an addition operation to each entry.
|
FieldVector<T> |
mapDivide(T d)
Map a division operation to each entry.
|
FieldVector<T> |
mapDivideToSelf(T d)
Map a division operation to each entry.
|
FieldVector<T> |
mapInv()
Map the 1/x function to each entry.
|
FieldVector<T> |
mapInvToSelf()
Map the 1/x function to each entry.
|
FieldVector<T> |
mapMultiply(T d)
Map a multiplication operation to each entry.
|
FieldVector<T> |
mapMultiplyToSelf(T d)
Map a multiplication operation to each entry.
|
FieldVector<T> |
mapSubtract(T d)
Map a subtraction operation to each entry.
|
FieldVector<T> |
mapSubtractToSelf(T d)
Map a subtraction operation to each entry.
|
FieldMatrix<T> |
outerProduct(FieldVector<T> v)
Compute the outer product.
|
FieldVector<T> |
projection(FieldVector<T> v)
Find the orthogonal projection of this vector onto another vector.
|
void |
set(T value)
Set all elements to a single value.
|
void |
setEntry(int index,
T value)
Set a single element.
|
void |
setSubVector(int index,
FieldVector<T> v)
Set a set of consecutive elements.
|
FieldVector<T> |
subtract(FieldVector<T> v)
Compute
this minus v. |
T[] |
toArray()
Convert the vector to a T array.
|
Field<T> getField()
FieldVector<T> copy()
FieldVector<T> add(FieldVector<T> v)
this and v.v - vector to be addedthis + vDimensionMismatchException - if v is not the same size as thisFieldVector<T> subtract(FieldVector<T> v)
this minus v.v - vector to be subtractedthis - vDimensionMismatchException - if v is not the same size as thisFieldVector<T> mapAdd(T d)
d - value to be added to each entrythis + dNullArgumentException - if d is null.FieldVector<T> mapAddToSelf(T d)
The instance is changed by this method.
d - value to be added to each entrythisNullArgumentException - if d is null.FieldVector<T> mapSubtract(T d)
d - value to be subtracted to each entrythis - dNullArgumentException - if d is nullFieldVector<T> mapSubtractToSelf(T d)
The instance is changed by this method.
d - value to be subtracted to each entrythisNullArgumentException - if d is nullFieldVector<T> mapMultiply(T d)
d - value to multiply all entries bythis * dNullArgumentException - if d is null.FieldVector<T> mapMultiplyToSelf(T d)
The instance is changed by this method.
d - value to multiply all entries bythisNullArgumentException - if d is null.FieldVector<T> mapDivide(T d)
d - value to divide all entries bythis / dNullArgumentException - if d is null.MathArithmeticException - if d is zero.FieldVector<T> mapDivideToSelf(T d)
The instance is changed by this method.
d - value to divide all entries bythisNullArgumentException - if d is null.MathArithmeticException - if d is zero.FieldVector<T> mapInv()
MathArithmeticException - if one of the entries is zero.FieldVector<T> mapInvToSelf()
The instance is changed by this method.
thisMathArithmeticException - if one of the entries is zero.FieldVector<T> ebeMultiply(FieldVector<T> v)
v - vector by which instance elements must be multipliedthis[i] * v[i] for all iDimensionMismatchException - if v is not the same size as thisFieldVector<T> ebeDivide(FieldVector<T> v)
v - vector by which instance elements must be dividedthis[i] / v[i] for all iDimensionMismatchException - if v is not the same size as thisMathArithmeticException - if one entry of v is zero.T dotProduct(FieldVector<T> v)
v - vector with which dot product should be computedthis and vDimensionMismatchException - if v is not the same size as thisFieldVector<T> projection(FieldVector<T> v)
v - vector onto which this must be projectedthis onto vDimensionMismatchException - if v is not the same size as thisMathArithmeticException - if v is the null vector.FieldMatrix<T> outerProduct(FieldVector<T> v)
v - vector with which outer product should be computedT getEntry(int index)
index - Index location of entry to be fetched.index.OutOfRangeException - if the index is not valid.setEntry(int, FieldElement)void setEntry(int index,
T value)
index - element index.value - new value for the element.OutOfRangeException - if the index is not valid.getEntry(int)int getDimension()
FieldVector<T> append(FieldVector<T> v)
v - vector to append to this one.FieldVector<T> append(T d)
d - T to append.FieldVector<T> getSubVector(int index, int n)
index - index of first element.n - number of elements to be retrieved.OutOfRangeException - if the index is not valid.NotPositiveException - if the number of elements if not positive.void setSubVector(int index,
FieldVector<T> v)
index - index of first element to be set.v - vector containing the values to set.OutOfRangeException - if the index is not valid.void set(T value)
value - single value to set for all elementsT[] toArray()
The array is independent from vector data, it's elements are copied.
Copyright © 2025 CNES. All rights reserved.