Multivariate Polynomial.Gradient Method
Definition
Namespace: Numerics.NET.Curves.Surfaces
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Overload List
| Gradient( | Computes the gradient of the surface at the specified point. |
| Gradient( | Computes the gradient of a 2D surface at the specified point. |
| Gradient( | Computes the gradient of the polynomial at the specified point. |
| Gradient( | Computes the gradient of the polynomial at the specified point. |
Gradient(ReadOnlySpan<Double>, Span<Double>)
Computes the gradient of the polynomial at the specified point.
public override void Gradient(
ReadOnlySpan<double> point,
Span<double> gradient
)Parameters
- point ReadOnlySpan<Double>
- A read-only span representing the coordinates of the point.
- gradient Span<Double>
- A span to receive the gradient vector.
Remarks
The gradient is computed as ∇p(x) = Σᵢ cᵢ · ∇φᵢ(x) where ∇φᵢ are the gradients of the basis monomials and cᵢ are the coefficients.
Exceptions
| Argument | The length of point does not equal Dimension, or the length of gradient does not equal Dimension. |
Gradient(Vector<Double>, Vector<Double>)
Computes the gradient of the polynomial at the specified point.
public Vector<double> Gradient(
Vector<double> point,
Vector<double>? result = null
)Parameters
- point Vector<Double>
- A vector representing the coordinates of the point.
- result Vector<Double> (Optional)
- An optional vector to receive the gradient. If null, a new vector is allocated.
Return Value
Vector<Double>A vector containing the gradient of the polynomial at the point.
Exceptions
| Argument | point is null. |
| Argument | The length of point does not equal Dimension, or result is not null and its length is incorrect. |