Surface.Gradients Method

Definition

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

Overload List

Gradients(Matrix<Double>) Computes the gradients of the surface at multiple points.
Gradients(Matrix<Double>, Matrix<Double>) Computes the gradients of the surface at multiple points.

Gradients(Matrix<Double>)

Computes the gradients of the surface at multiple points.
C#
public Matrix<double> Gradients(
	Matrix<double> points
)

Parameters

points  Matrix<Double>
A matrix where each row represents a point in N-dimensional space.

Return Value

Matrix<Double>
A new matrix where each row contains the gradient at the corresponding point.

Remarks

This is a convenience method that allocates a new matrix for the results.

The number of columns in points must equal Dimension.

The result matrix has the same dimensions as points.

Exceptions

ArgumentNullExceptionpoints is null.
ArgumentException The number of columns in points does not equal Dimension.
NotSupportedException This surface type does not support gradient computation.

Gradients(Matrix<Double>, Matrix<Double>)

Computes the gradients of the surface at multiple points.
C#
public Matrix<double> Gradients(
	Matrix<double> points,
	Matrix<double>? result
)

Parameters

points  Matrix<Double>
A matrix where each row represents a point in N-dimensional space.
result  Matrix<Double>
An optional matrix to receive the gradients. If null, a new matrix is allocated.

Return Value

Matrix<Double>
A matrix where each row contains the gradient at the corresponding point.

Remarks

The number of columns in points must equal Dimension.

If result is non-null, it must have the same dimensions as points.

Exceptions

ArgumentNullExceptionpoints is null.
ArgumentException

The number of columns in points does not equal Dimension.

-or-

result is non-null and does not have the same dimensions as points.

NotSupportedException This surface type does not support gradient computation.

See Also