Struct sbr::data::CompressedInteractions [−][src]
pub struct CompressedInteractions { /* fields omitted */ }
A compressed representation of interactions, where the interactions themselves are arranged by user and by timestamp.
Normally created by Interactions::to_compressed.
Methods
impl CompressedInteractions
[src]
impl CompressedInteractions
ⓘImportant traits for CompressedInteractionsUserIterator<'a>pub fn iter_users(&self) -> CompressedInteractionsUserIterator
[src]
ⓘImportant traits for CompressedInteractionsUserIterator<'a>
pub fn iter_users(&self) -> CompressedInteractionsUserIterator
Iterate over users.
pub fn get_user(&self, user_id: UserId) -> Option<CompressedInteractionsUser>
[src]
pub fn get_user(&self, user_id: UserId) -> Option<CompressedInteractionsUser>
Get a particular user's interactions.
pub fn num_users(&self) -> usize
[src]
pub fn num_users(&self) -> usize
Return number of users.
pub fn num_items(&self) -> usize
[src]
pub fn num_items(&self) -> usize
Return number of items.
pub fn shape(&self) -> (usize, usize)
[src]
pub fn shape(&self) -> (usize, usize)
Return (num_users
, num_items
).
pub fn to_interactions(&self) -> Interactions
[src]
pub fn to_interactions(&self) -> Interactions
Convert to Interactions
.
Trait Implementations
impl Clone for CompressedInteractions
[src]
impl Clone for CompressedInteractions
fn clone(&self) -> CompressedInteractions
[src]
fn clone(&self) -> CompressedInteractions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for CompressedInteractions
[src]
impl Debug for CompressedInteractions
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> From<&'a Interactions> for CompressedInteractions
[src]
impl<'a> From<&'a Interactions> for CompressedInteractions
fn from(interactions: &Interactions) -> CompressedInteractions
[src]
fn from(interactions: &Interactions) -> CompressedInteractions
Performs the conversion.
Auto Trait Implementations
impl Send for CompressedInteractions
impl Send for CompressedInteractions
impl Sync for CompressedInteractions
impl Sync for CompressedInteractions