MultivariatePolynomialBasis.EvaluateBasisGradient Method

Definition

Namespace: Numerics.NET.Curves.Surfaces
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0

Overload List

EvaluateBasisGradient(ReadOnlySpan<Double>, Span2D<Double>) Computes the gradient of all basis functions at the specified point.
EvaluateBasisGradient(Vector<Double>, Matrix<Double>) Computes the gradient of all basis functions at the specified point.

EvaluateBasisGradient(ReadOnlySpan<Double>, Span2D<Double>)

Computes the gradient of all basis functions at the specified point.
C#
public void EvaluateBasisGradient(
	ReadOnlySpan<double> point,
	Span2D<double> basisGradients
)

Parameters

point  ReadOnlySpan<Double>
A read-only span containing the coordinates of the point. Length must equal Dimension.
basisGradients  Span2D<Double>
A 2D span to receive the computed gradients. Each row corresponds to one basis function, and each column corresponds to one coordinate dimension. Must have BasisCount rows and Dimension columns.

Remarks

For each basis monomial x^α = x₁^α₁ · ... · xₐ^αₐ, this method computes the partial derivatives:

∂(x^α)/∂xₖ = αₖ · x₁^α₁ · ... · xₖ^(αₖ-1) · ... · xₐ^αₐ if αₖ > 0, and 0 otherwise.

The gradients are stored row-wise in basisGradients, where row i contains the gradient of basis function i.

Exceptions

ArgumentExceptionpoint or basisGradients has incorrect dimensions.

EvaluateBasisGradient(Vector<Double>, Matrix<Double>)

Computes the gradient of all basis functions at the specified point.
C#
public Matrix<double> EvaluateBasisGradient(
	Vector<double> point,
	Matrix<double>? result = null
)

Parameters

point  Vector<Double>
A vector containing the coordinates of the point.
result  Matrix<Double>  (Optional)
An optional matrix to receive the computed gradients. If null, a new matrix is allocated. Each row corresponds to one basis function, and each column corresponds to one coordinate dimension.

Return Value

Matrix<Double>
A matrix where row i contains the gradient of basis function i.

Exceptions

ArgumentNullExceptionpoint is null.
ArgumentException The length of point does not equal Dimension, or result is not null and its dimensions are incorrect.

See Also