Is your feature request related to a problem? Please describe.
Statistics routines are currently rigid and not optimised for performance, making extensions and adaptations difficult.
Describe the solution you'd like
Rewrite and modularise statistics routines to allow for easier extension and improved performance.
Describe alternatives you've considered
Rewriting only parts of statistics routines, but full modularisation is preferable.
Additional context
Related to parent issue #242.
Is your feature request related to a problem? Please describe.
Statistics routines are currently rigid and not optimised for performance, making extensions and adaptations difficult.
Describe the solution you'd like
Rewrite and modularise statistics routines to allow for easier extension and improved performance.
Describe alternatives you've considered
Rewriting only parts of statistics routines, but full modularisation is preferable.
Additional context
Related to parent issue #242.