MultivariatePolynomialBasis.EvaluateBasis Method

Definition

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

Overload List

EvaluateBasis(Matrix<Double>, Matrix<Double>) Evaluates all basis functions at multiple points.
EvaluateBasis(ReadOnlySpan<Double>, Span<Double>) Evaluates all basis functions at the specified point.
EvaluateBasis(ReadOnlySpan2D<Double>, Span2D<Double>) Evaluates all basis functions at multiple points stored in column-major layout.
EvaluateBasis(Vector<Double>, Vector<Double>) Evaluates all basis functions at the specified point.

EvaluateBasis(Matrix<Double>, Matrix<Double>)

Evaluates all basis functions at multiple points.
C#
public Matrix<double> EvaluateBasis(
	Matrix<double> points,
	Matrix<double>? result = null
)

Parameters

points  Matrix<Double>
A matrix where each row represents one point. Must have Dimension columns.
result  Matrix<Double>  (Optional)
An optional matrix to receive the computed basis values. If null, a new matrix is allocated. Each row corresponds to one point, and each column corresponds to one basis function.

Return Value

Matrix<Double>
A matrix where each row contains the basis function values for one point.

Exceptions

ArgumentNullExceptionpoints is null.
ArgumentException The number of columns in points does not equal Dimension, or result is not null and its dimensions are incorrect.

EvaluateBasis(ReadOnlySpan<Double>, Span<Double>)

Evaluates all basis functions at the specified point.
C#
public void EvaluateBasis(
	ReadOnlySpan<double> point,
	Span<double> basisValues
)

Parameters

point  ReadOnlySpan<Double>
A read-only span containing the coordinates of the point. Length must equal Dimension.
basisValues  Span<Double>
A span to receive the computed basis function values. Length must equal BasisCount.

Remarks

For each basis monomial x^α, this method computes x^α = x₁^α₁ · x₂^α₂ · ... · xₐ^αₐ.

The results are stored in basisValues in the canonical basis order.

Exceptions

ArgumentExceptionpoint or basisValues has incorrect length.

EvaluateBasis(ReadOnlySpan2D<Double>, Span2D<Double>)

Evaluates all basis functions at multiple points stored in column-major layout.
C#
public void EvaluateBasis(
	ReadOnlySpan2D<double> points,
	Span2D<double> basisValues
)

Parameters

points  ReadOnlySpan2D<Double>
A 2D read-only span containing the points in column-major order, where each column represents one point and rows represent coordinate dimensions. Must have Dimension rows.
basisValues  Span2D<Double>
A 2D span to receive the computed basis values. Each column corresponds to one point, and each row corresponds to one basis function. Must have BasisCount rows and the same number of columns as points.

Remarks

This method evaluates the basis at each point stored as a column in points and stores the results in the corresponding column of basisValues.

Exceptions

ArgumentException The dimensions of points or basisValues are incorrect.

EvaluateBasis(Vector<Double>, Vector<Double>)

Evaluates all basis functions at the specified point.
C#
public Vector<double> EvaluateBasis(
	Vector<double> point,
	Vector<double>? result = null
)

Parameters

point  Vector<Double>
A vector containing the coordinates of the point.
result  Vector<Double>  (Optional)
An optional vector to receive the computed basis values. If null, a new vector is allocated.

Return Value

Vector<Double>
A vector containing the basis function values at point.

Exceptions

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

See Also