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( DoubleComplexVector u, DoubleComplexVector v, DoubleComplexVector w ) |
| Visual Basic (Declaration) |
|---|
Public Shared Sub Add ( _ u As DoubleComplexVector, _ v As DoubleComplexVector, _ w As DoubleComplexVector _ ) |
| Visual C++ |
|---|
public: static void Add( DoubleComplexVector^ u, DoubleComplexVector^ v, DoubleComplexVector^ w ) |
Parameters
- u
- Type: CenterSpace.NMath.Core..::.DoubleComplexVector
A vector.
- v
- Type: CenterSpace.NMath.Core..::.DoubleComplexVector
A vector.
- w
- Type: CenterSpace.NMath.Core..::.DoubleComplexVector
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. |