Expand description
Utility functions and algorithms Utility functions and algorithms module
This module provides various utility functions and algorithms used throughout the crate, including mathematical functions, data structures, and computational methods specific to stochastic process simulations.
Structs§
- Circulant
Embedding - Circulant embedding method for generating stationary Gaussian random fields with given correlation functions
Functions§
- approx_
eq - Check if two floating numbers are approximately equal within a tolerance
- cumsum
- Calculate the cumulative sum of a vector
- diff
- Calculate the difference between adjacent elements in an array
- eval_
poly - Evaluate a polynomial using the Horner method
- exponential_
correlation - Exponential correlation function: exp(-r/l)
- fbm_
correlation - Fractional Brownian motion correlation function
- flatten_
interpolate - Generate a flattened (step function) interpolation over a specified range
- float_
eq - Check if two floating numbers are equal within the f64 precision
- gaussian_
correlation - Gaussian correlation function: exp(-(r/l)^2)
- is_
increasing - Check if an array is non-decreasing
- linear_
interpolate - Linear interpolation
- linspace
- Generate a vector of evenly spaced numbers over a specified range
- matern_
five_ half_ correlation - Matérn correlation function (nu=5/2): (1 + sqrt(5)r/l + 5r^2/(3*l^2)) * exp(-sqrt(5)*r/l)
- matern_
half_ correlation - Matérn correlation function (nu=1/2): exp(-r/l)
- matern_
three_ half_ correlation - Matérn correlation function (nu=3/2): (1 + sqrt(3)*r/l) * exp(-sqrt(3)*r/l)
- minmax
- find max value and min value in a &[f64]
- write_
csv io - Write data to a CSV file