pub unsafe extern "C" fn LGBM_DatasetCreateFromCSRFunc(
get_row_funptr: *mut c_void,
num_rows: c_int,
num_col: i64,
parameters: *const c_char,
reference: DatasetHandle,
out: *mut DatasetHandle,
) -> c_intExpand description
Create a dataset from CSR format through callbacks.
§Arguments
get_row_funptr- Pointer tostd::function<void(int idx, std::vector<std::pair<int, double>>& ret)>(called for every row and expected to clear and fillret)num_rows- Number of rowsnum_col- Number of columnsparameters- Additional parametersreference- Used to align bin mapper with other dataset, nullptr means isn’t usedout(direction out) - Created dataset
§Returns
0 when succeed, -1 when failure happens