oa::data::Dataset

Object-safe dataset contract: indexed access and a total count. Corresponds to the C++ pure-virtual oa::Dataset base class.

TrRust public API

Declaration

pub trait Dataset { // Required methods fn len(&self) -> i64; fn get_item(&self, index: i64) -> Result<Matrix>; // Provided methods fn is_empty(&self) -> bool { ... } fn get_sample(&self, index: i64) -> Result<Sample> { ... } fn subset(&self, indices: Vec<i64>) -> Result<Subset<'_>> where Self: Sized { ... } }
Public Rust declaration.

Public Methods

fn len(&self) -> i64
fn get_item(&self, index: i64) -> Result<Matrix>
fn is_empty(&self) -> bool
fn get_sample(&self, index: i64) -> Result<Sample>
fn subset(&self, indices: Vec<i64>) -> Result<Subset<'_>>where Self: Sized,

Public Method Documentation

fn len( &self ) -> i64
No public source comment is attached to this declaration.
fn get_item( &self, index: i64 ) -> Result<Matrix>
No public source comment is attached to this declaration.
fn is_empty( &self ) -> bool
No public source comment is attached to this declaration.
fn get_sample( &self, index: i64 ) -> Result<Sample>
No public source comment is attached to this declaration.
fn subset( &self, indices: Vec<i64> ) -> Result<Subset<'_>>where Self: Sized,
No public source comment is attached to this declaration.