Skip to content

v3.5.3 — FB calculator loop extraction, STL algorithm improvements

Choose a tag to compare

@OldCrow OldCrow released this 10 May 00:41
· 429 commits to main since this release
v3.5.3
4da43ae

Code quality patch. No public API changes. 37/37 tests pass.

Changed

  • ForwardBackwardCalculator pairwise/max-reduce extraction
    (src/calculators/forward_backward_calculator.cpp): the pointer-setup
    block and outer time-loop were duplicated between the Pairwise and
    MaxReduce forward and backward passes. Extracted compute_forward<Fn>
    and compute_backward<Fn> anonymous-namespace templates; the four
    concrete methods are now single-call wrappers. Completes the Tier 2
    plan item that was previously marked done but only partially executed.

  • BasicMatrix3D constructor delegation
    (include/libhmm/linalg/basic_matrix3d.h): the zero-fill constructor
    now delegates to the init-value constructor in one line, removing
    duplicated dimension-validation and allocation code.

  • STL algorithm improvements (10 distribution files +
    src/common/weighted_stats.cpp): replaces unconditional weight
    accumulator loops with std::accumulate, enabling const on the
    result. Replaces the Weibull data-validation loop with std::any_of.
    Adds explicit #include <numeric> where previously relying on
    transitive inclusion.