Crate oefpil_sys

Crate oefpil_sys 

Source
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 Systembuilt-inRuntime DependenciesBuild Dependencies
Debian Trixieliblapack3gcc | clang, liblapack-dev
Debian Trixie gfortran
Fedora Linuxlapackgcc | clang, lapack-devel
Fedora Linux gcc-gfortran
Arch Linuxlapackgcc | 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.

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 fields of diagonal tile of tcm created with oefpil_tcm_blockdiag_new.
oefpil_tcm_blockdiag_set_tile_full
Sets fields of symmetric block tile of tcm created with oefpil_tcm_blockdiag_new.
oefpil_tcm_blockdiag_set_tile_half
Sets fields of symmetric block tile of tcm created with oefpil_tcm_blockdiag_new.
oefpil_tcm_diag_new
Creates tiled covariance matrix of diagonal tiles on its diagonal.
oefpil_tcm_diag_set_tile_diag
Sets fields of diagonal tile of tcm created with oefpil_tcm_diag_new.
oefpil_tcm_diags_new
Creates tiled covariance matrix of diagonal tiles.
oefpil_tcm_diags_set_tile_diag
Sets fields of diagonal tile of tcm created with oefpil_tcm_diags_new.
oefpil_tcm_full_new
Creates tiled covariance matrix of diagonal or block tiles.
oefpil_tcm_full_set_tile_diag
Sets fields of diagonal tile of tcm created with oefpil_tcm_blockdiag_new.
oefpil_tcm_full_set_tile_full
Sets fields of row-major block tile of tcm created with oefpil_tcm_full_new.
oefpil_tcm_full_set_tile_half
Sets fields of symmetric block tile of tcm created with oefpil_tcm_blockdiag_new.
oefpil_tilemap_alltiles_new
Creates initialized tilemap for oefpil_tcm_diags_new or oefpil_tcm_full_new.
oefpil_tilemap_diagtiles_new
Creates initialized tilemap for oefpil_tcm_diag_new or oefpil_tcm_blockdiag_new.
stderr_file
Returns the standard error file.
stdin_file
Returns the standard input file.
stdout_file
Returns the standard output file.

Type Aliases§

Evaluate
Function pointer type passed to oefpil as 1st argument.