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 LAPACK and requires a C
compiler as build dependency. With the built-in feature enabled (marked with ☑ in the table
below), a subset of LAPACK and its dependency BLAS shipped with this crate is compiled and
statically linked. This eliminates the runtime dependency LAPACK but requires the GCC Fortran
compiler 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, the GNU Fortran runtime library and the GCC quad-precision math
library) whereas dynamic linking serves as fallback if no static libraries are found. The
required runtime and build dependencies are satisfied by installing following system packages
where “or” as in | has higher precedence than “and” as in ,:
| Operating System | built-in | Runtime Dependencies | Build Dependencies |
|---|---|---|---|
| Debian Trixie | ☐ | liblapack3 | gcc | clang, liblapack-dev |
| Debian Trixie | ☑ | gfortran | |
| Fedora Linux | ☐ | lapack | gcc | clang, lapack-devel |
| Fedora Linux | ☑ | gcc-gfortran | |
| Arch Linux | ☐ | lapack | gcc | clang, lapack |
| Arch Linux | ☑ | gcc-fortran |
§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§
- Criterion
- Convergence criterion.
- Mode
- Mode of tiled covariance matrix or mode of tile as part of tilemap.
- Verbosity
- Log verbosity.
Functions§
- oefpil⚠
- Fits the initial estimate of the model’s parameter to the data sample of its variable.
- oefpil_
tcm_ ⚠blockdiag_ new - Creates tiled covariance matrix of diagonal or block tiles on its diagonal.
- oefpil_
tcm_ ⚠blockdiag_ set_ tile_ diag - Sets
fieldsof diagonal tile oftcmcreated withoefpil_tcm_blockdiag_new. - oefpil_
tcm_ ⚠blockdiag_ set_ tile_ full - Sets
fieldsof symmetric block tile oftcmcreated withoefpil_tcm_blockdiag_new. - oefpil_
tcm_ ⚠blockdiag_ set_ tile_ half - Sets
fieldsof symmetric block tile oftcmcreated withoefpil_tcm_blockdiag_new. - oefpil_
tcm_ ⚠diag_ new - Creates tiled covariance matrix of diagonal tiles on its diagonal.
- oefpil_
tcm_ ⚠diag_ set_ tile_ diag - Sets
fieldsof diagonal tile oftcmcreated withoefpil_tcm_diag_new. - oefpil_
tcm_ ⚠diags_ new - Creates tiled covariance matrix of diagonal tiles.
- oefpil_
tcm_ ⚠diags_ set_ tile_ diag - Sets
fieldsof diagonal tile oftcmcreated withoefpil_tcm_diags_new. - oefpil_
tcm_ ⚠full_ new - Creates tiled covariance matrix of diagonal or block tiles.
- oefpil_
tcm_ ⚠full_ set_ tile_ diag - Sets
fieldsof diagonal tile oftcmcreated withoefpil_tcm_blockdiag_new. - oefpil_
tcm_ ⚠full_ set_ tile_ full - Sets
fieldsof row-major block tile oftcmcreated withoefpil_tcm_full_new. - oefpil_
tcm_ ⚠full_ set_ tile_ half - Sets
fieldsof symmetric block tile oftcmcreated withoefpil_tcm_blockdiag_new. - oefpil_
tilemap_ alltiles_ new - Creates initialized tilemap for
oefpil_tcm_diags_neworoefpil_tcm_full_new. - oefpil_
tilemap_ diagtiles_ new - Creates initialized tilemap for
oefpil_tcm_diag_neworoefpil_tcm_blockdiag_new. - stderr_
file - Returns the standard error file.
- stdin_
file - Returns the standard input file.
- stdout_
file - Returns the standard output file.