Skip to main content

Module cache

Module cache 

Source
Expand description

LRU kernel cache matching the original LIBSVM.

The cache stores rows of the kernel matrix Q as Qfloat (f32) slices. When memory is exhausted, the least-recently-used row is evicted.

The C++ original uses a doubly-linked circular list with raw pointers. This Rust version uses a VecDeque for the LRU order and Vec<Option<Vec<Qfloat>>> for per-row data, avoiding unsafe code while matching the semantics.

Structs§

Cache
LRU cache for kernel matrix rows.

Type Aliases§

Qfloat
Element type for cached kernel matrix rows. Matches LIBSVM’s Qfloat = float.