Adds a scaled vector to this vector.

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Overridable Function Add ( _
	factor As Double, _
	vector As Vector _
) As Vector
C#
public virtual Vector Add (
	double factor,
	Vector vector
)
C++
public:
virtual Vector^ Add (
	double factor, 
	Vector^ vector
)

Parameters

factor (System.Double)
The scale factor.
vector (Extreme.Mathematics.LinearAlgebra.Vector)
The vector to add.

Return Value

A reference to this instance.

Remarks

Using this method is more efficient than evaluating the equivalent expression using overloaded operators. In the latter case, two intermediate vectors are created. This method doesn't create any intermediate vectors.

Exceptions

ExceptionCondition
ArgumentNullExceptionvector is nullNothingnullptr
DimensionMismatchException The length of vector does not equal the length of this instance.