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();
Note that as almost all operations on FieldElement throw NullArgumentException when operating on a null element, it is the responsibility
of FieldVector implementations to make sure no null elements
are inserted into the vector. This must be done in all constructors and
all setters.
| Modifier and Type | Method and Description |
|---|---|
| public FieldVector | |
| public FieldVector | Returns: a new vectorvector to append to this one. v)Construct a vector by appending a vector to this vector. |
| public FieldVector | |
| public FieldVector | |
| public T | Returns: the scalar dot product ofthis and vvector with which dot product should be computed v)Compute the dot product. |
| public FieldVector | Returns: a vector containingthis[i] / v[i] for all ivector by which instance elements must be divided v)Element-by-element division. |
| public FieldVector | Returns: a vector containingthis[i] * v[i] for all ivector by which instance elements must be multiplied v)Element-by-element multiplication. |
| public T[] | |
| public int | |
| public T | Returns: the vector entry atindex.Index location of entry to be fetched. index)Returns the entry in the specified index. |
| public Field | Returns: type of field elements of the vectorGet the type of field elements of the vector. |
| public FieldVector | Returns: a vector containing n elements.index of first element. index, int number of elements to be retrieved. n)Get a subvector from consecutive elements. |
| public FieldVector | |
| public FieldVector | Returns: for convenience, returnthisvalue to be added to each entry d)Map an addition operation to each entry. |
| public FieldVector | Returns: this / dvalue to divide all entries by d)Map a division operation to each entry. |
| public FieldVector | Returns: for convenience, returnthisvalue to divide all entries by d)Map a division operation to each entry. |
| public FieldVector | Returns: a vector containing the result of applying the function to each entry.Map the 1/x function to each entry. |
| public FieldVector | |
| public FieldVector | Returns: this * dvalue to multiply all entries by d)Map a multiplication operation to each entry. |
| public FieldVector | Returns: for convenience, returnthisvalue to multiply all entries by d)Map a multiplication operation to each entry. |
| public FieldVector | Returns: this - dvalue to be subtracted to each entry d)Map a subtraction operation to each entry. |
| public FieldVector | Returns: for convenience, returnthisvalue to be subtracted to each entry d)Map a subtraction operation to each entry. |
| public FieldMatrix | Returns: the matrix outer product between instance and vvector with which outer product should be computed v)Compute the outer product. |
| public FieldVector | Returns: projection ofthis onto vvector onto which v)this must be projectedFind the orthogonal projection of this vector onto another vector. |
| public void | |
| public void | |
| public void | setSubVector(int
index of first element to be set. index, FieldVector<T> vector containing the values to set. v)Set a set of consecutive elements. |
| public FieldVector | |
| public T[] |
| add | back to summary |
|---|---|
| public FieldVector Compute the sum of
| |
| append | back to summary |
|---|---|
| public FieldVector Construct a vector by appending a vector to this vector.
| |
| append | back to summary |
|---|---|
| public FieldVector Construct a vector by appending a T to this vector.
| |
| copy | back to summary |
|---|---|
| public FieldVector Returns a (deep) copy of this.
| |
| dotProduct | back to summary |
|---|---|
| public T dotProduct(FieldVector<T> v) throws DimensionMismatchException Compute the dot product.
| |
| ebeDivide | back to summary |
|---|---|
| public FieldVector Element-by-element division.
| |
| ebeMultiply | back to summary |
|---|---|
| public FieldVector Element-by-element multiplication.
| |
| getData | back to summary |
|---|---|
| public T[] getData()
Deprecated as of 3.1, to be removed in 4.0. Please use the Returns vector entries as a T array.
| |
| getDimension | back to summary |
|---|---|
| public int getDimension() Returns the size of the vector.
| |
| getEntry | back to summary |
|---|---|
| public T getEntry(int index) throws OutOfRangeException Returns the entry in the specified index.
| |
| getField | back to summary |
|---|---|
| public Field Get the type of field elements of the vector.
| |
| getSubVector | back to summary |
|---|---|
| public FieldVector Get a subvector from consecutive elements.
| |
| mapAdd | back to summary |
|---|---|
| public FieldVector Map an addition operation to each entry.
| |
| mapAddToSelf | back to summary |
|---|---|
| public FieldVector Map an addition operation to each entry. The instance is changed by this method.
| |
| mapDivide | back to summary |
|---|---|
| public FieldVector Map a division operation to each entry.
| |
| mapDivideToSelf | back to summary |
|---|---|
| public FieldVector Map a division operation to each entry. The instance is changed by this method.
| |
| mapInv | back to summary |
|---|---|
| public FieldVector Map the 1/x function to each entry.
| |
| mapInvToSelf | back to summary |
|---|---|
| public FieldVector Map the 1/x function to each entry. The instance is changed by this method.
| |
| mapMultiply | back to summary |
|---|---|
| public FieldVector Map a multiplication operation to each entry.
| |
| mapMultiplyToSelf | back to summary |
|---|---|
| public FieldVector Map a multiplication operation to each entry. The instance is changed by this method.
| |
| mapSubtract | back to summary |
|---|---|
| public FieldVector Map a subtraction operation to each entry.
| |
| mapSubtractToSelf | back to summary |
|---|---|
| public FieldVector Map a subtraction operation to each entry. The instance is changed by this method.
| |
| outerProduct | back to summary |
|---|---|
| public FieldMatrix Compute the outer product.
| |
| projection | back to summary |
|---|---|
| public FieldVector Find the orthogonal projection of this vector onto another vector.
| |
| set | back to summary |
|---|---|
| public void set(T value) Set all elements to a single value.
| |
| setEntry | back to summary |
|---|---|
| public void setEntry(int index, T value) throws OutOfRangeException Set a single element.
| |
| setSubVector | back to summary |
|---|---|
| public void setSubVector(int index, FieldVector<T> v) throws OutOfRangeException Set a set of consecutive elements.
| |
| subtract | back to summary |
|---|---|
| public FieldVector Compute
| |
| toArray | back to summary |
|---|---|
| public T[] toArray() Convert the vector to a T array. The array is independent from vector data, it's elements are copied.
| |