[][src]Function nblast::table_to_fn

pub fn table_to_fn(
    dist_thresholds: Vec<Precision>,
    dot_thresholds: Vec<Precision>,
    cells: Vec<Precision>
) -> impl Fn(&DistDot) -> Precision

Convert an empirically-derived table mapping pointwise distance and tangent absolute dot products to pointwise scores into a function which can be passed to neuron queries. These scores are then summed across all points in the query to give the raw NBLAST score.

Cells are passed in dist-major order i.e. if the original table had distance bins in the left margin and dot product bins on the top margin, the cells should be given in row-major order.

Each bin is identified by its upper bound: the lower bound is implicitly the previous bin's upper bound, or zero. The output is constrained to the limits of the table.