Dataset
-
struct DataSet
typedef struct DataSet { scalar *data; size_t size; bool err; } DataSet;
-
size_t size
Size of the data, that is, the number of elements
data
can hold.
-
bool err
Error indicator.
-
size_t size
Object creation
-
DataSet *DataSet_NewEmpty(void)
Create a new, uninitialized
DataSet
object and return an pointer to it.
Operations
-
void DataSet_SetValue(DataSet *restrict this, size_t idx, scalar val)
Set the element with index
idx
ofthis
toval
. Perform bounds checking. SetDataSet.err
totrue
on failure.
-
void DataSet_GetValue(DataSet *restrict this, size_t idx, scalar *out)
Write the value of the
this
element with indexidx
toout
. Perform bounds checking. SetDataSet.err
totrue
on failure.