Linear Combination<T>.Add Method
Definition
Namespace: Numerics.NET.Curves.Generic
Assembly: Numerics.NET.Generic (in Numerics.NET.Generic.dll) Version: 9.0.1
Assembly: Numerics.NET.Generic (in Numerics.NET.Generic.dll) Version: 9.0.1
Overload List
Add( | Adds another LinearCombination<T> to this instance. |
Add( | Adds a multiple of another LinearCombination<T> to this instance. |
Add( | Adds two linear combinations. |
Add(LinearCombination<T>)
Adds another LinearCombination<T> to this instance.
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
Argument | combination is null. |
Add(T, LinearCombination<T>)
Adds a multiple of another LinearCombination<T> to this instance.
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
Argument | combination is null. |
Argument | This instance and combination do not have the same [!:Basis<T>]. |
Add(LinearCombination<T>, LinearCombination<T>)
Adds two linear combinations.
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
Argument | combination1 is null.
-or- combination2 is null. |