Many, many more comments

This commit is contained in:
2024-12-04 17:15:04 +01:00
parent 8696517336
commit 03854339ca
100 changed files with 1702 additions and 49 deletions
+13
View File
@@ -4,19 +4,32 @@
#include <functional>
#include <vector>
// R^1 -> R^1 mappings
namespace D1ToD1 {
// return a function defined at the vector positions with the vector values
// which interpolates linearly between those values
// both vectors have to be sorted according to the values in positions
std::function<double(double)> PiecewiseLinear(std::vector<double> positions,
std::vector<double> values);
// return a function, that always returns the constant value "constant"
std::function<double(double)> Constant(double constant);
// return a function returning the product of the values defined by the functions
// in the vector "functions"
std::function<double(double)> Product(
std::vector<std::function<double(double)>> functions);
}; // namespace D1ToD1
// R^3 -> R^1 mappings
namespace D3ToD1 {
// return a function, that always returns the constant value "constant"
std::function<double(double, double, double)> Constant(double value);
// return a function that returns the product of the values of the functions fi, fj and fk
// fi calculates its value from the first parameter the function "Product" returns gets,
// fj from the second parameter and
// fk from the third
std::function<double(double, double, double)> Product(
std::function<double(double)> fi,
std::function<double(double)> fj,