MultivariatePolynomial.Evaluate Method

Definition

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

Overload List

Evaluate(Double[]) Evaluates the surface at the specified point.
Evaluate(IReadOnlyList<Double>) Evaluates the surface at the specified point.
Evaluate(ReadOnlySpan<Double>) Evaluates the polynomial at the specified point.
Evaluate(Vector<Double>) Evaluates the polynomial at the specified point.
Evaluate(IReadOnlyList<Vector<Double>>, Span<Double>) Evaluates the surface at multiple points specified by a list of vectors.
Evaluate(Matrix<Double>, Vector<Double>) Evaluates the polynomial at multiple points.
Evaluate(ReadOnlySpan<Vector<Double>>, Span<Double>) Evaluates the surface at multiple points specified by a read-only span of vectors.
Evaluate(ReadOnlySpan2D<Double>, Span<Double>) Evaluates the polynomial at multiple points stored in column-major layout.
Evaluate(Int32, ReadOnlySpan2D<Double>, Span<Double>) Evaluates the surface at multiple points stored in column-major layout.

Evaluate(ReadOnlySpan<Double>)

Evaluates the polynomial at the specified point.
C#
public override double Evaluate(
	ReadOnlySpan<double> point
)

Parameters

point  ReadOnlySpan<Double>
A read-only span representing the coordinates of the point.

Return Value

Double
The value of the polynomial at the specified point.

Remarks

This method computes p(x) = Σᵢ cᵢ · φᵢ(x) where φᵢ are the basis monomials and cᵢ are the coefficients.

Exceptions

ArgumentException The length of point does not equal Dimension.

Evaluate(Vector<Double>)

Evaluates the polynomial at the specified point.
C#
public double Evaluate(
	Vector<double> point
)

Parameters

point  Vector<Double>
A vector representing the coordinates of the point.

Return Value

Double
The value of the polynomial at the specified point.

Exceptions

ArgumentNullExceptionpoint is null.
ArgumentException The length of point does not equal Dimension.

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

Evaluates the polynomial at multiple points.
C#
public Vector<double> Evaluate(
	Matrix<double> points,
	Vector<double>? result = null
)

Parameters

points  Matrix<Double>
A matrix where each row represents one point.
result  Vector<Double>  (Optional)
An optional vector to receive the computed values. If null, a new vector is allocated.

Return Value

Vector<Double>
A vector containing the polynomial values at each point.

Exceptions

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

Evaluate(ReadOnlySpan2D<Double>, Span<Double>)

Evaluates the polynomial at multiple points stored in column-major layout.
C#
public void Evaluate(
	ReadOnlySpan2D<double> points,
	Span<double> values
)

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.
values  Span<Double>
A span to receive the computed polynomial values.

Remarks

This method evaluates the polynomial at each point stored as a column in points and stores the results in values.

Exceptions

ArgumentException The dimensions of points or values are incorrect.

See Also