pub fn pack_sequences(
sequences: &[&[u32]],
max_length: usize,
) -> Result<Vec<PackedBatch>, RloxError>Expand description
Pack variable-length sequences into fixed-size bins using first-fit-decreasing.
Sorts sequences by length (longest first), then greedily assigns each to the first bin that has enough remaining capacity. Creates a new bin if no existing bin can fit the sequence.
Returns Err if any single sequence exceeds max_length.