A function from a d-dimensional domain to an m-dimensional image.
Implementations of gsFunction must at the very least implement the evaluation function gsFunction::eval_into(). It is also recommended to specify the source and target dimensions by overriding gsFunction::domainDim() and gsFunction::targetDim().
The functions for the derivatives may either be overridden or left as the default implementations, which use finite differences.
Evaluation members
All evaluation functions take a matrix u as an argument which specifies where the function should be evaluated. This matrix should have d rows, and every column specifies one point of the domain at which the function should be evaluated.
Here is an overview over the different evaluation procedures available:
| Name of procedure | Evaluate what |
|---|---|
eval(u) | value |
deriv(u) | first derivative(s) |
deriv2(u) | second derivative(s) |
All evaluation functions also provide a version suffixed with _into which takes a matrix reference as an additional output parameter into which the result will be stored.
-
Template Parameters
-
T arithmetic type
本文深入探讨了gsFunction在多维空间中的应用,包括如何实现它以进行函数评估,以及如何指定源和目标维度。同时介绍了不同类型的评估过程,如值评估、一阶导数评估和二阶导数评估,并阐述了模板参数的重要性。
1397

被折叠的 条评论
为什么被折叠?



