ALFI
Advanced Library for Function Interpolation
|
Enumerations | |
enum class | Type { GENERAL , UNIFORM , QUADRATIC , CUBIC , CHEBYSHEV , CHEBYSHEV_STRETCHED , CHEBYSHEV_ELLIPSE , CHEBYSHEV_ELLIPSE_STRETCHED , CIRCLE_PROJECTION , ELLIPSE_PROJECTION , LOGISTIC , LOGISTIC_STRETCHED , ERF , ERF_STRETCHED } |
Functions | |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | uniform (SizeT n, Number a, Number b) |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | quadratic (SizeT n, Number a, Number b) |
Generates a distribution of n points on the segment [a, b] using two quadratic polynomials. | |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | cubic (SizeT n, Number a, Number b) |
Generates a distribution of n points on the segment [a, b] using cubic polynomial. | |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | chebyshev (SizeT n, Number a, Number b) |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | chebyshev_stretched (SizeT n, Number a, Number b) |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | chebyshev_ellipse (SizeT n, Number a, Number b, Number ratio) |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | chebyshev_ellipse_stretched (SizeT n, Number a, Number b, Number ratio) |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | circle_proj (SizeT n, Number a, Number b) |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | ellipse_proj (SizeT n, Number a, Number b, Number ratio) |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | logistic (SizeT n, Number a, Number b, Number steepness) |
Generates a distribution of n points on the interval (a, b) using the logistic function. | |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | logistic_stretched (SizeT n, Number a, Number b, Number steepness) |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | erf (SizeT n, Number a, Number b, Number steepness) |
Generates a distribution of n points on the interval (a, b) using the error function. | |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | erf_stretched (SizeT n, Number a, Number b, Number steepness) |
template<typename Number = DefaultNumber, template< typename, typename... > class Container = DefaultContainer> | |
Container< Number > | of_type (Type type, SizeT n, Number a, Number b, Number parameter=NAN) |
|
strong |
Container< Number > alfi::dist::uniform | ( | SizeT | n, |
Number | a, | ||
Number | b ) |
Container< Number > alfi::dist::quadratic | ( | SizeT | n, |
Number | a, | ||
Number | b ) |
Generates a distribution of n
points on the segment [a, b]
using two quadratic polynomials.
The following transform function \(f\):
\[ f(x) = \begin{cases} (x+1)^2 - 1, & x \leq 0 \\ -(x-1)^2 + 1, & x > 0 \end{cases} \]
is applied to n
points uniformly distributed on the segment [-1, 1]
, mapping them onto the same segment.
The resulting points are then linearly mapped to the target segment [a, b]
.
n | number of points |
a | left boundary of the segment |
b | right boundary of the segment |
n
points distributed on the segment [a, b]
according to the transform function Container< Number > alfi::dist::cubic | ( | SizeT | n, |
Number | a, | ||
Number | b ) |
Generates a distribution of n
points on the segment [a, b]
using cubic polynomial.
The following transform function \(f\):
\[ f(x) = -0.5x^3 + 1.5x \]
is applied to n
points uniformly distributed on the segment [-1, 1]
, mapping them onto the same segment.
The resulting points are then linearly mapped to the target segment [a, b]
.
n | number of points |
a | left boundary of the segment |
b | right boundary of the segment |
n
points distributed on the segment [a, b]
according to the transform function Container< Number > alfi::dist::chebyshev | ( | SizeT | n, |
Number | a, | ||
Number | b ) |
Container< Number > alfi::dist::chebyshev_stretched | ( | SizeT | n, |
Number | a, | ||
Number | b ) |
Container< Number > alfi::dist::chebyshev_ellipse | ( | SizeT | n, |
Number | a, | ||
Number | b, | ||
Number | ratio ) |
Container< Number > alfi::dist::chebyshev_ellipse_stretched | ( | SizeT | n, |
Number | a, | ||
Number | b, | ||
Number | ratio ) |
Container< Number > alfi::dist::circle_proj | ( | SizeT | n, |
Number | a, | ||
Number | b ) |
Container< Number > alfi::dist::ellipse_proj | ( | SizeT | n, |
Number | a, | ||
Number | b, | ||
Number | ratio ) |
Container< Number > alfi::dist::logistic | ( | SizeT | n, |
Number | a, | ||
Number | b, | ||
Number | steepness ) |
Generates a distribution of n
points on the interval (a, b)
using the logistic function.
The following transform function \(f\):
\[ f(x) = \frac{1}{1 + e^{-steepness \cdot x}} \]
is applied to n
points uniformly distributed on the interval (-1, 1)
, mapping them onto the (0, 1)
interval.
The resulting points are then linearly mapped to the target interval (a, b)
.
The slope of the transform function \(f\) at x = 0
is determined by steepness
and is given by:
\[ \left. \dv{f}{x} \right\vert_{x=0} = \frac14 \cdot steepness \]
(a, b)
boundaries.n | number of points |
a | left boundary of the interval |
b | right boundary of the interval |
steepness | determines the slope of the transform function at x = 0 |
n
points distributed on the interval (a, b)
according to the transform function Container< Number > alfi::dist::logistic_stretched | ( | SizeT | n, |
Number | a, | ||
Number | b, | ||
Number | steepness ) |
Container< Number > alfi::dist::erf | ( | SizeT | n, |
Number | a, | ||
Number | b, | ||
Number | steepness ) |
Generates a distribution of n
points on the interval (a, b)
using the error function.
The following transform function \(f\):
\[ f(x) = \operatorname{erf}(steepness \cdot x) \]
is applied to n
points uniformly distributed on the interval (-1, 1)
, mapping them onto the same interval.
The resulting points are then linearly mapped to the target interval (a, b)
.
The slope of the transform function \(f\) at x = 0
is determined by steepness
and is given by:
\[ \left. \dv{f}{x} \right\vert_{x=0} = \frac2\pi \cdot steepness \]
(a, b)
boundaries.n | number of points |
a | left boundary of the interval |
b | right boundary of the interval |
steepness | determines the slope of the transform function at x = 0 |
n
points distributed on the interval (a, b)
according to the transform function Container< Number > alfi::dist::erf_stretched | ( | SizeT | n, |
Number | a, | ||
Number | b, | ||
Number | steepness ) |