Interface FieldVector<T extends FieldElement<T>>

  • Type Parameters:
    T - the type of the field elements
    All Known Implementing Classes:
    ArrayFieldVector, SparseFieldVector

    public interface FieldVector<T extends FieldElement<T>>
    Interface defining a field-valued vector with basic algebraic operations.

    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.