Pointwise Operations |
Hereinafter the following convention is used:
– small Greek letters are used to denote scalars;
– small Latin letters are used to denote vectors;
– capital Latin letters are used to denote matrices.
This topic contains the following sections:
Pointwise addition operation is identical to simple addition, as it allows adding each element of the given vector to a scalar or to the corresponding element of the other vector.
Operation | Description | Performance |
---|---|---|
vector-scalar pointwise addition | Calculates the sum of a scalar and each element of the vector, which is identical to simple vector-scalar addition: In place:Returning result:Out of place: | |
vector-vector pointwise addition | Adds each element of the given vector to the corresponding element of the defined vector. This operation is identical to simple vector-vector addition. given: then: In place:Returning result:Out of place: |
Pointwise subtraction allows calculating the difference between each element of the given vector and a scalar or between each element of the given vector and the corresponding element of the other defined vector.
Operation | Description | Performance |
---|---|---|
vector-scalar pointwise subtraction | Subtracts the given scalar from each element of the vector: In place:PointwiseSubtractInPlace(Double) Returning result:Out of place:PointwiseSubtract(Double, Vector) Subtracts each element of the vector from the given scalar: In place:PointwiseLeftSubtractInPlace(Double) Returning result:Out of place: | |
vector-vector pointwise subtraction | Subtracts each element of the other vector from the corresponding element of the given vector: then: In place:PointwiseSubtractInPlace(Vector) Returning result:Out of place:PointwiseSubtract(Vector, Vector) Subtracts each element of the vector from the corresponding element of another vector: In place:PointwiseLeftSubtractInPlace(Vector) Returning result:Out of place: |
Pointwise multiplication provides multiplying each element of the given vector by a scalar or by the corresponding element of the other given vector.
Operation | Description | Performance |
---|---|---|
vector-scalar pointwise multiplication | Multiplies each element of the vector by the given scalar: In place:PointwiseMultiplyInPlace(Double) Returning result:Out of place: | |
vector-vector pointwise multiplication | Multiplies each element of the given vector by the corresponding element of another given vector: In place:PointwiseMultiplyInPlace(Vector) Returning result:Out of place: |
Division of each element of the vector by a scalar or be the corresponding element of the second vector.
Operation | Description | Performance |
---|---|---|
vector-scalar pointwise division | Divides each element of this vector by the given scalar: In place:PointwiseDivideInPlace(Double) Returning result:Out of place:PointwiseDivide(Double, Vector) Divides a given scalar by each element of this vector: In place:PointwiseLeftDivideInPlace(Double) Returning result:Out of place: | |
vector-vector pointwise division | Divides each element of this vector by the corresponding element of the other vector: In place:PointwiseDivideInPlace(Vector) Returning result:Out of place:PointwiseDivide(Vector, Vector) Divides each element of the second vector by the corresponding element of this vector: In place:PointwiseLeftDivideInPlace(Vector) Returning result:Out of place: |