Multivariate Polynomial Basis.Evaluate Basis 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
| Evaluate | Evaluates all basis functions at multiple points. |
| Evaluate | Evaluates all basis functions at the specified point. |
| Evaluate | Evaluates all basis functions at multiple points stored in column-major layout. |
| Evaluate | Evaluates all basis functions at the specified point. |
EvaluateBasis(Matrix<Double>, Matrix<Double>)
Evaluates all basis functions at multiple points.
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
| Argument | points is null. |
| Argument | 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.
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
| Argument | point or basisValues has incorrect length. |
EvaluateBasis(ReadOnlySpan2D<Double>, Span2D<Double>)
Evaluates all basis functions at multiple points stored in column-major layout.
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
| Argument | The dimensions of points or basisValues are incorrect. |
EvaluateBasis(Vector<Double>, Vector<Double>)
Evaluates all basis functions at the specified point.
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
| Argument | point is null. |
| Argument | The length of point does not equal Dimension, or result is not null and its length does not equal BasisCount. |