Crate tktax_burst

Crate tktax_burst 

Source

Constants§

DEFAULT_HEAVY_BURST_WINDOW_SIZE_DAYS
DEFAULT_TOP_N_HEAVY_BURSTS

Traits§

FindHeavyTransactionBursts
A trait for finding the heaviest “bursts” of transaction activity over a given time window.

Functions§

build_date_windows
Build the date windows of size window_size days by summing daily totals in [date, date+window_size-1].
collect_daily_totals
Build a map of (NaiveDate -> total) for the given transactions
merge_overlapping_burst_windows
Merge overlapping date windows (ignoring the total amount here) into [start, end] pairs. Overlap is defined as date ranges that are consecutive or intersecting.
print_merged_bursts
Print the final merged date windows, each with a recomputed total, and then the individual transaction lines within that date range.
sort_windows_desc
Sort the date windows by the total MonetaryAmount in descending order.