package irmin-bench

  1. Overview
  2. Docs
Irmin benchmarking suite

Install

Dune Dependency

Authors

Maintainers

Sources

irmin-3.6.1.tbz
sha256=11fc2570bdbfd48478c89113fc801084a84a9a2c12d9bf8c64e05ce64ae19bd7
sha512=2171699ca24dec5c9c908a2676b272e034c14eb17f7052a794535e52af0be40be68a689e59c0a640ee244b11703320483f4d0c261542e6242ba23a8f1272b9b0

doc/irmin-bench.traces/Irmin_traces/Trace_stat_summary_utils/Resample/index.html

Module Trace_stat_summary_utils.ResampleSource

This Resample module offers 3 ways to resample a 1d vector:

  • At the lowest level, using should_sample.
  • Using create_acc / accumulate / finalise.
  • At the highest level, using resample_vector.

Both downsampling and upsampling are possible:

> upsampling
vec0: |       |       |        |  (len0:4)
vec1: |    |    |    |    |    |  (len1:6)
> identity
vec0: |       |       |        |  (len0:4)
vec1: |       |       |        |  (len1:4)
> downsampling
vec0: |    |    |    |    |    |  (len0:6)
vec1: |       |       |        |  (len1:4)

The first and last point of the input and output sequences are always equal.

Sourceval should_sample : i0:int -> len0:int -> i1:int -> len1:int -> [ `After | `Before | `Inside of float | `Out_of_bounds ]

When resampling a 1d vector from len0 to len1, this function locates a destination point with index i1 relative to the range i0 - 1 excluded and i0 included.

When both i0 and i1 equal 0, the result is `Inside 1..

len0 and len1 should be greater or equal to 2.

Sourcetype acc
Sourceval create_acc : [ `Interpolate | `Next_neighbor ] -> len0:int -> len1:int -> v00:float -> acc

Creates a resampling accumulator.

Requires the first point of vec0.

Sourceval accumulate : acc -> float -> acc
Sourceval finalise : acc -> curve
Sourceval resample_vector : [< `Interpolate | `Next_neighbor ] -> curve -> int -> curve

resample_vector mode vec0 len1 is vec1, a curve of length len1, created by resampling vec0.

It internally relies on the should_sample function.

OCaml

Innovation. Community. Security.