Expand description
Rust FFI bindings to statically linked C/Fortran library OEFPIL
For a safe API, see the oefpil crate.
§System Requirements
By default, this crate dynamically links to the runtime dependency liblapack (e.g., package
liblapack3 on Debian, package lapack on Fedora Linux or Arch Linux) and requires a C
compiler as build dependency (e.g., package clang or gcc on Debian, Fedora Linux, or Arch
Linux). With the built-in feature, a subset of liblapack and its dependency libblas
shipped with this crate is compiled and statically linked. This eliminates the runtime
dependency liblapack but requires the GCC Fortran compiler (e.g, gfortran on Debian,
gcc-fortran on Fedora Linux or Arch Linux) as build dependency which itself depends on and
complements the GCC C compiler such that GCC can compile both C and Fortran sources. It is
attempted to statically link the dependencies of the subset (i.e, libgfortran and
libquadmath) whereas dynamic linking serves as fallback if no static libraries are found.
§Overview
The main function of interest is oefpil. Among other arguments, it expects the convergence
Criterion, log Verbosity, log FILE (e.g., stdout_file, stderr_file), and a
covariance matrix tiled by variables. Among its data fields, a tiled covariance matrix (TCM)
comprises metadata about its tilemap and tiling Mode. The tilemap encodes via
Mode::Diagonal or Mode::Full which tiles are diagonal or block tiles. The number of
samples and variables define the number of fields per tile and the number of tiles per
covariance matrix. A diagonal tile stores samples fields whereas a block tile stores
samples.pow(2) fields. The tiling mode encodes where the tiles are and whether their mode is
restricted to be diagonal. For each tiling mode, there are different sets of methods for
allocating the tilemap and the data fields and for setting the data fields per tile.
Mode::Diagonal: Diagonal tiles on the diagonal.oefpil_tilemap_diagtiles_new: Allocates tilemap.oefpil_tcm_diag_new: Allocates fields.oefpil_tcm_diag_set_tile_diag: Sets fields per diagonal tile.
Mode::BlockDiagonal: Diagonal or block tiles on the diagonal.oefpil_tilemap_diagtiles_new: Allocates tilemap.oefpil_tcm_blockdiag_new: Allocates fields.oefpil_tcm_blockdiag_set_tile_diag: Sets fields per diagonal tile.oefpil_tcm_blockdiag_set_tile_half: Sets fields per block tile (row-major triangular slice of lower triangle).oefpil_tcm_blockdiag_set_tile_full: Sets fields per block tile (row-major slice).
Mode::Diagonals: Diagonal tiles all over.oefpil_tilemap_alltiles_new: Allocates tilemap.oefpil_tcm_diags_new: Allocates fields.oefpil_tcm_diags_set_tile_diag: Sets fields per diagonal tile.
Mode::Full: Diagonal or block tiles all over.oefpil_tilemap_alltiles_new: Allocates tilemap.oefpil_tcm_full_new: Allocates fields.oefpil_tcm_full_set_tile_diag: Sets fields per diagonal tile.oefpil_tcm_full_set_tile_half: Sets fields per block tile (row-major triangular slice of lower triangle).oefpil_tcm_full_set_tile_full: Sets fields per block tile (row-major slice).
Re-exports§
pub use libc;
Enums§
- Convergence criterion.
- Mode of tiled covariance matrix or mode of tile as part of tilemap.
- Log verbosity.
Functions§
- Fits the initial estimate of the model’s parameter to the data sample of its variable.
- Creates tiled covariance matrix of diagonal or block tiles on its diagonal.
- Creates tiled covariance matrix of diagonal tiles on its diagonal.
- Creates tiled covariance matrix of diagonal tiles.
- Creates tiled covariance matrix of diagonal or block tiles.
- Creates initialized tilemap for
oefpil_tcm_diags_neworoefpil_tcm_full_new. - Creates initialized tilemap for
oefpil_tcm_diag_neworoefpil_tcm_blockdiag_new. - Returns the standard error file.
- Returns the standard input file.
- Returns the standard output file.
Type Aliases§
- Function pointer type passed to
oefpilas 1st argument.