FieldVector interface with a FieldElement array.
| Modifier and Type | Field and Description |
|---|---|
| private T[] | data
Entries of the vector. |
| private final Field | field
Field to which the elements belong. |
| private static final long | serialVersionUID
Serializable version identifier. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ArrayFieldVector(Field<T>
Field to which the elements belong. field, int Size of the vector. size)Construct a vector of zeroes. |
| public | ArrayFieldVector(int
Size of the vector. size, T All entries will be set with this value. preset)Construct a vector with preset values. |
| public | |
| public | ArrayFieldVector(Field<T>
Field to which the elements belong. field, T[] Array. d)Construct a vector from an array, copying the input array. |
| public | ArrayFieldVector(T[]
Data for the new vector. d, boolean If copyArray)true, the input array will be copied,
otherwise it will be referenced.Create a new ArrayFieldVector using the input array as the underlying data array. |
| public | ArrayFieldVector(Field<T>
Field to which the elements belong. field, T[] Data for the new vector. d, boolean If copyArray)true, the input array will be copied,
otherwise it will be referenced.Create a new ArrayFieldVector using the input array as the underlying data array. |
| public | ArrayFieldVector(T[]
Array. d, int Position of the first entry. pos, int Number of entries to copy. size)Construct a vector from part of a array. |
| public | ArrayFieldVector(Field<T>
Field to which the elements belong. field, T[] Array. d, int Position of the first entry. pos, int Number of entries to copy. size)Construct a vector from part of a array. |
| public | ArrayFieldVector(FieldVector<T>
Vector to copy. v)Construct a vector from another vector, using a deep copy. |
| public | ArrayFieldVector(ArrayFieldVector<T>
Vector to copy. v)Construct a vector from another vector, using a deep copy. |
| public | ArrayFieldVector(ArrayFieldVector<T>
Vector to copy. v, boolean If deep)true perform a deep copy, otherwise perform
a shallow copyConstruct a vector from another vector. |
| public | ArrayFieldVector(ArrayFieldVector<T>
First vector (will be put in front of the new vector). v1, ArrayFieldVector<T> Second vector (will be put at back of the new vector). v2)
Deprecated
as of 3.2, replaced by
ArrayFieldVector(FieldVector, FieldVector)
Construct a vector by appending one vector to another vector. |
| public | ArrayFieldVector(FieldVector<T>
First vector (will be put in front of the new vector). v1, FieldVector<T> Second vector (will be put at back of the new vector). v2)Construct a vector by appending one vector to another vector. |
| public | ArrayFieldVector(ArrayFieldVector<T>
First vector (will be put in front of the new vector). v1, T[] Second vector (will be put at back of the new vector). v2)
Deprecated
as of 3.2, replaced by
ArrayFieldVector(FieldVector, FieldElement[])
Construct a vector by appending one vector to another vector. |
| public | ArrayFieldVector(FieldVector<T>
First vector (will be put in front of the new vector). v1, T[] Second vector (will be put at back of the new vector). v2)Construct a vector by appending one vector to another vector. |
| public | ArrayFieldVector(T[]
First vector (will be put in front of the new vector). v1, ArrayFieldVector<T> Second vector (will be put at back of the new vector). v2)
Deprecated
as of 3.2, replaced by
ArrayFieldVector(FieldElement[], FieldVector)
Construct a vector by appending one vector to another vector. |
| public | ArrayFieldVector(T[]
First vector (will be put in front of the new vector). v1, FieldVector<T> Second vector (will be put at back of the new vector). v2)Construct a vector by appending one vector to another vector. |
| public | ArrayFieldVector(T[]
First vector (will be put in front of the new vector). v1, T[] Second vector (will be put at back of the new vector). v2)Construct a vector by appending one vector to another vector. |
| public | ArrayFieldVector(Field<T>
Field to which the elements belong. field, T[] First vector (will be put in front of the new vector). v1, T[] Second vector (will be put at back of the new vector). v2)Construct a vector by appending one vector to another vector. |
| Modifier and Type | Method and Description |
|---|---|
| public FieldVector | add(FieldVector<T>
vector to be added v)Implements org. Compute the sum of |
| public ArrayFieldVector | |
| public FieldVector | append(FieldVector<T>
vector to append to this one. v)Implements org. Construct a vector by appending a vector to this vector. |
| public ArrayFieldVector | Returns: a new vectorvector to append to this one. v)Implements org. Construct a vector by appending a vector to this vector. |
| public FieldVector | append(T
T to append. in)Implements org. Construct a vector by appending a T to this vector. |
| private void | |
| private void | checkIndices(final int
the index of the first entry of the subvector start, final int the index of the last entry of the subvector (inclusive) end)Checks that the indices of a subvector are valid. |
| protected void | checkVectorDimensions(FieldVector<T>
vector to compare instance with v)Check if instance and specified vectors have the same dimension. |
| protected void | checkVectorDimensions(int
Expected dimension. n)Check if instance dimension is equal to some expected value. |
| public FieldVector | |
| public T | dotProduct(FieldVector<T>
vector with which dot product should be computed v)Implements org. Compute the dot product. |
| public T | Returns: the scalar dot product ofthis and vvector with which dot product should be computed v)Compute the dot product. |
| public FieldVector | ebeDivide(FieldVector<T>
vector by which instance elements must be divided v)Implements org. Element-by-element division. |
| public ArrayFieldVector | Returns: a vector containingthis[i] / v[i] for all ivector by which instance elements must be divided v)Element-by-element division. |
| public FieldVector | ebeMultiply(FieldVector<T>
vector by which instance elements must be multiplied v)Implements org. Element-by-element multiplication. |
| public ArrayFieldVector | Returns: a vector containingthis[i] * v[i] for all ivector by which instance elements must be multiplied v)Element-by-element multiplication. |
| public boolean | Returns: true if two vector objects are equal, false
otherwise.Object to test for equality. other)Overrides java. Test for the equality of two vectors. |
| public T[] | getData()
Implements org. Returns vector entries as a T array. |
| public T[] | |
| public int | getDimension()
Implements org. Returns the size of the vector. |
| public T | getEntry(int
Index location of entry to be fetched. index)Implements org. Returns the entry in the specified index. |
| public Field | getField()
Implements org. Get the type of field elements of the vector. |
| public FieldVector | getSubVector(int
index of first element. index, int number of elements to be retrieved. n)Implements org. Get a subvector from consecutive elements. |
| public int | Returns: a hash code value for this objectOverrides java. Get a hashCode for the real vector. |
| public FieldVector | mapAdd(T
value to be added to each entry d)Implements org. Map an addition operation to each entry. |
| public FieldVector | mapAddToSelf(T
value to be added to each entry d)Implements org. Map an addition operation to each entry. |
| public FieldVector | mapDivide(T
value to divide all entries by d)Implements org. Map a division operation to each entry. |
| public FieldVector | mapDivideToSelf(T
value to divide all entries by d)Implements org. Map a division operation to each entry. |
| public FieldVector | mapInv()
Implements org. Map the 1/x function to each entry. |
| public FieldVector | mapInvToSelf()
Implements org. Map the 1/x function to each entry. |
| public FieldVector | mapMultiply(T
value to multiply all entries by d)Implements org. Map a multiplication operation to each entry. |
| public FieldVector | mapMultiplyToSelf(T
value to multiply all entries by d)Implements org. Map a multiplication operation to each entry. |
| public FieldVector | mapSubtract(T
value to be subtracted to each entry d)Implements org. Map a subtraction operation to each entry. |
| public FieldVector | mapSubtractToSelf(T
value to be subtracted to each entry d)Implements org. Map a subtraction operation to each entry. |
| public FieldMatrix | outerProduct(FieldVector<T>
vector with which outer product should be computed v)Implements org. Compute the outer product. |
| 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 | projection(FieldVector<T>
vector onto which v)this must be projectedImplements org. Find the orthogonal projection of this vector onto another vector. |
| public ArrayFieldVector | Returns: projection ofthis onto vvector onto which v)this must be projectedFind the orthogonal projection of this vector onto another vector. |
| public void | set(int
index of first element to be set. index, ArrayFieldVector<T> vector containing the values to set. v)Set a set of consecutive elements. |
| public void | set(T
single value to set for all elements value)Implements org. Set all elements to a single value. |
| public void | setEntry(int
element index. index, T new value for the element. value)Implements org. Set a single element. |
| public void | setSubVector(int
index of first element to be set. index, FieldVector<T> vector containing the values to set. v)Implements org. Set a set of consecutive elements. |
| public FieldVector | subtract(FieldVector<T>
vector to be subtracted v)Implements org. Compute |
| public ArrayFieldVector | |
| public T[] | toArray()
Implements org. Convert the vector to a T array. |
| public T | Returns: the value returned byFieldVectorPreservingVisitor#end()
at the end of the walkthe visitor to be used to process the entries of this
vector visitor)Visits (but does not alter) all entries of this vector in default order (increasing index). |
| public T | Returns: the value returned byFieldVectorPreservingVisitor#end()
at the end of the walkvisitor to be used to process the entries of this vector visitor, final int the index of the first entry to be visited start, final int the index of the last entry to be visited (inclusive) end)Visits (but does not alter) some entries of this vector in default order (increasing index). |
| public T | Returns: the value returned byFieldVectorChangingVisitor#end()
at the end of the walkthe visitor to be used to process and modify the entries
of this vector visitor)Visits (and possibly alters) all entries of this vector in default order (increasing index). |
| public T | Returns: the value returned byFieldVectorChangingVisitor#end()
at the end of the walkvisitor to be used to process the entries of this vector visitor, final int the index of the first entry to be visited start, final int the index of the last entry to be visited (inclusive) end)Visits (and possibly alters) some entries of this vector in default order (increasing index). |
| public T | Returns: the value returned byFieldVectorPreservingVisitor#end()
at the end of the walkthe visitor to be used to process the entries of this
vector visitor)Visits (but does not alter) all entries of this vector in optimized order. |
| public T | Returns: the value returned byFieldVectorPreservingVisitor#end()
at the end of the walkvisitor to be used to process the entries of this vector visitor, final int the index of the first entry to be visited start, final int the index of the last entry to be visited (inclusive) end)Visits (but does not alter) some entries of this vector in optimized order. |
| public T | Returns: the value returned byFieldVectorChangingVisitor#end()
at the end of the walkthe visitor to be used to process the entries of this
vector visitor)Visits (and possibly alters) all entries of this vector in optimized order. |
| public T | Returns: the value returned byFieldVectorChangingVisitor#end()
at the end of the walkvisitor to be used to process the entries of this vector visitor, final int the index of the first entry to be visited start, final int the index of the last entry to be visited (inclusive) end)Visits (and possibly change) some entries of this vector in optimized order. |