Module recoreco::types

source ·
Expand description

Type definitions to map from tensors to Rust collections

Item-based recommenders need to work with different types of matrices (especially sparse ones). This module defines the internal representation (e.g., the Rust collections) used for these matrices.

Functions

Allocates a dense zero vector with of size dimensions
Allocates a sparse binary matrix with empty rows

Type Definitions

32 bit integer vector, backed by a Vec<u32>
Sparse binary matrix, row-wise representation, backed by a Vec<FnvHashSet<u32>>
Sparse 16 bit integer matrix, row-wise representation, backed by a Vec<FnvHashMap<u32, u16>>
Sparse 16 bit integer vector, backed by a FnvHashMap<u32, u16>