Polynomial<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 to this instance.
Add(Polynomial<T>, Polynomial<T>) Adds two polynomials.

Add(T, LinearCombination<T>)

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

Parameters

factor  T
Multiplier for the second LinearCombination.
combination  LinearCombination<T>
The LinearCombination to add to this instance. It must be of type Polynomial<T>.

Return Value

LinearCombination<T>
A LinearCombination that contains a reference to this instance.

Remarks

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

Exceptions

ArgumentNullExceptioncombination is null.
ArgumentExceptioncombination is not an instance of Polynomial<T>.

-or-

The degree of combination is greater than the maximum degree of the polynomial.

Add(Polynomial<T>, Polynomial<T>)

Adds two polynomials.
C#
public static Polynomial<T> Add(
	Polynomial<T> polynomial1,
	Polynomial<T> polynomial2
)

Parameters

polynomial1  Polynomial<T>
The first Polynomial<T>.
polynomial2  Polynomial<T>
The second Polynomial<T>.

Return Value

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

See Also