Trait neuroflow::data::Extractable [] [src]

pub trait Extractable {
    fn rand(&self) -> (&Vec<f64>, &Vec<f64>);
fn get(&self, i: usize) -> (&Vec<f64>, &Vec<f64>);
fn len(&self) -> usize; }

Trait for getting specific element from set.

Examples

use neuroflow::data::Extractable;
use neuroflow::data::DataSet;

let mut data = DataSet::new();
data.push(&[3.01], &[4.0]);
data.rand();

Required Methods

Get random element from set

  • return - tuple of two links on vectors.

Get element from set by index

  • i: usize - index of element;
  • return - tuple of two links on vectors.

Get length of set

  • return - length of set.

Implementors