pub struct Datastore { /* private fields */ }Expand description
RAII wrapper around da_datastore — AOCL-DA’s container for tabular
data loaded from CSV. Use it to read a file, query its dimensions,
label or select columns by name, and extract numeric blocks into
caller-provided buffers.
Implementations§
Source§impl Datastore
impl Datastore
Sourcepub fn set_int_option(&mut self, name: &str, value: i64) -> Result<()>
pub fn set_int_option(&mut self, name: &str, value: i64) -> Result<()>
Set an integer-valued datastore option (e.g.
set_int_option("use header row", 1),
set_int_option("whitespace delimiter", 1)).
Sourcepub fn set_string_option(&mut self, name: &str, value: &str) -> Result<()>
pub fn set_string_option(&mut self, name: &str, value: &str) -> Result<()>
Set a string-valued datastore option (e.g. "comment" to set a
comment-line prefix character, "storage order" to choose
row-major vs column-major).
Sourcepub fn select_columns(
&mut self,
key: &str,
lbound: usize,
ubound: usize,
) -> Result<()>
pub fn select_columns( &mut self, key: &str, lbound: usize, ubound: usize, ) -> Result<()>
Select a contiguous range of columns into the named selection
key (zero-based, inclusive bounds). Use Datastore::extract_f64
to read the selected columns into a buffer.
Sourcepub fn select_rows(
&mut self,
key: &str,
lbound: usize,
ubound: usize,
) -> Result<()>
pub fn select_rows( &mut self, key: &str, lbound: usize, ubound: usize, ) -> Result<()>
Select a contiguous range of rows into the named selection key.
Sourcepub fn extract_f64(
&self,
key: &str,
layout: Layout,
data: &mut [f64],
lddata: usize,
) -> Result<()>
pub fn extract_f64( &self, key: &str, layout: Layout, data: &mut [f64], lddata: usize, ) -> Result<()>
Extract the named selection into data as f64 values, in the
order specified by layout. lddata is the leading dimension
of the output buffer.
Sourcepub fn as_raw(&self) -> da_datastore
pub fn as_raw(&self) -> da_datastore
Borrow the raw da_datastore handle (for routines this crate
doesn’t yet wrap).