GSI_Toolbox 1.0.0
A toolbox for Gas-Surface Interaction simulations
|
Class for computing Hermite polynomials and related operations. More...
#include <Hermite_Tools.h>
Public Member Functions | |
Hermite () | |
Default constructor for Hermite class. | |
~Hermite () | |
Destructor for Hermite class. | |
Matrix< T > | evaluate (Matrix< T > coefficients, Matrix< T > values) |
Evaluates the Hermite polynomial at specified values. | |
T | evaluate (Matrix< T > coefficients, T value) |
Evaluates the Hermite polynomial at a single value. | |
Matrix< T > | coefficients_deriv (Matrix< T > coefficients) |
Computes the derivative of the Hermite polynomial coefficients. | |
Matrix< T > | evaluate_deriv (Matrix< T > coefficients, Matrix< T > values) |
Evaluates the derivative of the Hermite polynomial at specified values. | |
T | evaluate_deriv (Matrix< T > coefficients, T value) |
Evaluates the derivative of the Hermite polynomial at a single value. | |
Matrix< T > | import_data (const char *file) |
Imports data for roots or weights from a file. | |
Matrix< T > | get_roots (unsigned int order) |
Retrieves the roots of the Hermite polynomial of specified order. | |
Matrix< T > | get_weights (unsigned int order) |
Retrieves the weights of the Hermite polynomial of specified order. | |
Matrix< T > | compute_coefficients (unsigned int order, T(*func)(T)) |
Computes the coefficients for the Hermite polynomial using a given function. | |
Class for computing Hermite polynomials and related operations.
The Hermite class provides methods for evaluating Hermite polynomials, computing their derivatives, and importing data for roots and weights.
T | The data type used for computations (e.g., float, double). |
Matrix< T > Hermite< T >::compute_coefficients | ( | unsigned int | order, |
T(* | func )(T) ) |
Computes the coefficients for the Hermite polynomial using a given function.
Computes the coefficients of the Hermite polynomial for a given function.
order | The order of the Hermite polynomial. |
func | Pointer to the function used to compute the coefficients. |
This function computes the coefficients of the Hermite polynomial of the specified order by evaluating the provided function at the roots of the polynomial and using the weights for integration. The coefficients are calculated based on these values.
order | The order of the Hermite polynomial. |
func | Pointer to the function to be used for computing the coefficients. |
Matrix< T > Hermite< T >::evaluate | ( | Matrix< T > | coefficients, |
Matrix< T > | values ) |
Evaluates the Hermite polynomial at specified values.
Evaluates the Hermite polynomial at specified matrix values.
coefficients | Coefficients of the Hermite polynomial. |
values | Matrix of input values at which to evaluate the polynomial. |
Matrix< T > Hermite< T >::evaluate_deriv | ( | Matrix< T > | coefficients, |
Matrix< T > | values ) |
Evaluates the derivative of the Hermite polynomial at specified values.
Evaluates the derivative of the Hermite polynomial at specified matrix values.
coefficients | Coefficients of the Hermite polynomial. |
values | Matrix of input values at which to evaluate the derivative. |
This function first computes the derivative of the Hermite polynomial coefficients and then evaluates the resulting derivative polynomial at the given input matrix values.
coefficients | Coefficients of the Hermite polynomial. |
values | Matrix of input values at which to evaluate the derivative. |
Evaluates the derivative of the Hermite polynomial at a single value.
coefficients | Coefficients of the Hermite polynomial. |
value | The input value at which to evaluate the derivative. |
This function first computes the derivative of the Hermite polynomial coefficients and then evaluates the resulting derivative polynomial at the given input value.
coefficients | Coefficients of the Hermite polynomial. |
value | The input value at which to evaluate the derivative. |
Retrieves the roots of the Hermite polynomial of specified order.
Retrieves the roots of the Hermite polynomial of the specified order.
order | The order of the Hermite polynomial. |
This function retrieves the roots from the precomputed data. If the order exceeds the maximum order, an error is printed, and an empty matrix is returned.
order | The order of the Hermite polynomial. |
Retrieves the weights of the Hermite polynomial of specified order.
Retrieves the weights of the Hermite polynomial of the specified order.
order | The order of the Hermite polynomial. |
This function retrieves the weights from the precomputed data. If the order exceeds the maximum order, an error is printed, and an empty matrix is returned.
order | The order of the Hermite polynomial. |
Imports data for roots or weights from a file.
Imports data (e.g., roots or weights) from a file.
file | The filename containing the data. |
The imported data is expected to be formatted with the first two values in the file representing the number of rows and columns, followed by the actual data values.
file | The filename containing the data. |