Skip to content

Reductor pattern to compute multiple statistics in one iterator pass. #324

@Evian-Zhang

Description

@Evian-Zhang

It is very common when we need multiple statistics of one data (for example, we may need both min and stddev at same time). However, current API design of statrs only allows us to compute those statistics by iterating the same data multiple times, which may be unnecessary for some statistics.

There are already some discussions in the rust forum (How to design a composable iterator adapter/consumer API?, Adding Iterator::extrema, argmin, argmax), and some one has proposed the crate reductor, which seems be able to solve this problem. However, the statistics provided by that crate is far less than the statrs crate.

Would you integrate the reductor pattern into statrs to solve this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions