LinearCombination<T>.Add Method

Definition

Namespace: Numerics.NET.Curves.Generic
Assembly: Numerics.NET.Generic (in Numerics.NET.Generic.dll) Version: 9.0.1

Overload List

Add(LinearCombination<T>) Adds another LinearCombination<T> to this instance.
Add(T, LinearCombination<T>) Adds a multiple of another LinearCombination<T> to this instance.
Add(LinearCombination<T>, LinearCombination<T>) Adds two linear combinations.

Add(LinearCombination<T>)

Adds another LinearCombination<T> to this instance.
C#
public LinearCombination<T> Add(
	LinearCombination<T> combination
)

Parameters

combination  LinearCombination<T>
The LinearCombination<T> to add to this instance.

Return Value

LinearCombination<T>
A reference to this instance.

Remarks

In order to add two linear combinations, they must have the same FunctionBasis<T>. If this is not the case, an ArgumentException is thrown.

Exceptions

ArgumentNullExceptioncombination is null.

Add(T, LinearCombination<T>)

Adds a multiple of another LinearCombination<T> to this instance.
C#
public virtual LinearCombination<T> Add(
	T factor,
	LinearCombination<T> combination
)

Parameters

factor  T
Multiplier for the second LinearCombination<T>.
combination  LinearCombination<T>
The LinearCombination<T> to add to this instance.

Return Value

LinearCombination<T>
A reference to this instance.

Remarks

In order to add two linear combinations, they must have the same FunctionBasis<T>. If this is not the case, an ArgumentException is thrown.

Exceptions

ArgumentNullExceptioncombination is null.
ArgumentException This instance and combination do not have the same [!:Basis<T>].

Add(LinearCombination<T>, LinearCombination<T>)

Adds two linear combinations.
C#
public static LinearCombination<T> Add(
	LinearCombination<T> combination1,
	LinearCombination<T> combination2
)

Parameters

combination1  LinearCombination<T>
The first PolynomialBase.
combination2  LinearCombination<T>
The second PolynomialBase.

Return Value

LinearCombination<T>
A PolynomialBase that is the sum of the two operands.

Exceptions

ArgumentNullExceptioncombination1 is null.

-or-

combination2 is null.

See Also