RPDindexOptimized provides an algorithmically optimized Python implementation of the six RPD indices while preserving the intended mathematical semantics of the original RPDindex reference software. The implementation retains linear-time complexity for the local indices and reduces the computational complexity of the global indices from (O(n^2)) to (O(n \log n)). This improvement is achieved through coordinate compression and Fenwick trees, which efficiently maintain cumulative counts and sums without explicitly enumerating all pairwise comparisons. The software also provides a dedicated progressive_indices() function for computing complete RPD trajectories over successive prefixes of a sequence, avoiding repeated full recomputation where incremental updates are possible. Numerical compatibility with the historical implementation is assessed through deterministic regression tests covering increasing, decreasing, constant, tied, negative, fractional, and pseudorandom numerical sequences, with floating-point differences evaluated using explicit numerical tolerances. The repository includes the optimized implementation, an archival reference implementation for regression testing, validation scripts, reproducible benchmarks, and technical documentation. RPDindexOptimized is intended as a computational optimization of the original RPD methodology rather than a redefinition of the indices.

RPDindexOptimized: optimized Python implementation of the RPD indices

marco righi
2026

Abstract

RPDindexOptimized provides an algorithmically optimized Python implementation of the six RPD indices while preserving the intended mathematical semantics of the original RPDindex reference software. The implementation retains linear-time complexity for the local indices and reduces the computational complexity of the global indices from (O(n^2)) to (O(n \log n)). This improvement is achieved through coordinate compression and Fenwick trees, which efficiently maintain cumulative counts and sums without explicitly enumerating all pairwise comparisons. The software also provides a dedicated progressive_indices() function for computing complete RPD trajectories over successive prefixes of a sequence, avoiding repeated full recomputation where incremental updates are possible. Numerical compatibility with the historical implementation is assessed through deterministic regression tests covering increasing, decreasing, constant, tied, negative, fractional, and pseudorandom numerical sequences, with floating-point differences evaluated using explicit numerical tolerances. The repository includes the optimized implementation, an archival reference implementation for regression testing, validation scripts, reproducible benchmarks, and technical documentation. RPDindexOptimized is intended as a computational optimization of the original RPD methodology rather than a redefinition of the indices.
2026
Istituto di Fisiologia Clinica - IFC - Sede Secondaria di Massa Carrara (soppressa)
RPD indices, RPDindex, algorithm optimization, Fenwick tree, Binary Indexed Tree, coordinate compression, computational complexity, numerical equivalence, regression testing, progressive indices, time series, research software, reproducibility, Python
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.14243/595122
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ente

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact