#[no_mangle]
pub unsafe extern "C" fn pineappl_grid_new(
    lumi: *const Lumi,
    orders: usize,
    order_params: *const u32,
    bins: usize,
    bin_limits: *const f64,
    key_vals: *const KeyVal
) -> Box<Grid>
Expand description

Creates a new and empty grid. The creation requires four different sets of parameters:

  • The luminosity function lumi: A pointer to the luminosity function that specifies how the cross section should be reconstructed.
  • Order specification orders and order_params. Each PineAPPL grid contains a number of different perturbative orders, specified by orders. The array order_params stores the exponent of each perturbative order and must contain 4 integers denoting the exponent of the string coupling, of the electromagnetic coupling, of the logarithm of the renormalization scale, and finally of the logarithm of the factorization scale.
  • The observable definition bins and bin_limits. Each PineAPPL grid can store observables from a one-dimensional distribution. To this end bins specifies how many observables are stored and bin_limits must contain bins + 1 entries denoting the left and right limit for each bin.
  • More (optional) information can be given in a key-value storage key_vals, which might be a null pointer, to signal there are no further parameters that need to be set.

§Safety

The parameter lumi must point a valid luminosity function created by pineappl_lumi_new. order_params must be an array with a length of 4 * orders, and bin_limits an array with length bins + 1. key_vals must be a valid KeyVal object created by pineappl_keyval_new.

§Panics

TODO