Adds two vectors and puts the result into a third vector.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public static void Add( FloatComplexVector u, FloatComplexVector v, FloatComplexVector w ) |
| Visual Basic (Declaration) |
|---|
Public Shared Sub Add ( _ u As FloatComplexVector, _ v As FloatComplexVector, _ w As FloatComplexVector _ ) |
| Visual C++ |
|---|
public: static void Add( FloatComplexVector^ u, FloatComplexVector^ v, FloatComplexVector^ w ) |
Parameters
- u
- Type: CenterSpace.NMath.Core..::.FloatComplexVector
A vector.
- v
- Type: CenterSpace.NMath.Core..::.FloatComplexVector
A vector.
- w
- Type: CenterSpace.NMath.Core..::.FloatComplexVector
A vector to hold the result.
Remarks
This method is provided as an alternative to the standard two-parameter
Add() method. The third passed vector holds the result of adding
the first two vectors:
CopyC#
No new memory is allocated. This increases efficiency for repeated operations,
such as within loops.
w[i] = u[i] + v[i]
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.MismatchedSizeException | Thrown if the three vectors are not all of the same length. |