public abstract class RealVectorextends ObjectClass defining a real-valued vector with basic algebraic operations.
vector element indexing is 0-based -- e.g.,
getEntry(0)returns the first element of the vector.
mapToSelfmethods operate on vectors element-wise, i.e. they perform the same operation (adding a scalar, applying a function ...) on each element in turn. The
mapversions create a new vector to hold the result and do not change the instance. The
mapToSelfversion uses the instance itself to store the results, so the instance is changed by this method. In all cases, the result vector is returned by the methods, allowing the fluent API style, like this:
RealVector result = v.mapAddToSelf(3.4).mapToSelf(new Tan()).mapToSelf(new Power(2.3));