Adds a scalar and a vector and puts the result into another vector.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public static void Add(
	double s,
	DoubleVector u,
	DoubleVector v
)
Visual Basic (Declaration)
Public Shared Sub Add ( _
	s As Double, _
	u As DoubleVector, _
	v As DoubleVector _
)
Visual C++
public:
static void Add(
	double s, 
	DoubleVector^ u, 
	DoubleVector^ v
)

Parameters

s
Type: System..::.Double
A scalar.
u
Type: CenterSpace.NMath.Core..::.DoubleVector
A vector.
v
Type: CenterSpace.NMath.Core..::.DoubleVector
A vector to hold the result.

Remarks

u[i] = s + v[i]

Exceptions

ExceptionCondition
CenterSpace.NMath.Core..::.MismatchedSizeExceptionThrown if the two vectors are not of the same length.

See Also