MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / LGBM_DatasetCreateFromCSC_R

Function LGBM_DatasetCreateFromCSC_R

src/lightgbm_R.cpp:66–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66LGBM_SE LGBM_DatasetCreateFromCSC_R(LGBM_SE indptr,
67 LGBM_SE indices,
68 LGBM_SE data,
69 LGBM_SE num_indptr,
70 LGBM_SE nelem,
71 LGBM_SE num_row,
72 LGBM_SE parameters,
73 LGBM_SE reference,
74 LGBM_SE out,
75 LGBM_SE call_state) {
76 R_API_BEGIN();
77 const int* p_indptr = R_INT_PTR(indptr);
78 const int* p_indices = R_INT_PTR(indices);
79 const double* p_data = R_REAL_PTR(data);
80
81 int64_t nindptr = static_cast<int64_t>(R_AS_INT(num_indptr));
82 int64_t ndata = static_cast<int64_t>(R_AS_INT(nelem));
83 int64_t nrow = static_cast<int64_t>(R_AS_INT(num_row));
84 DatasetHandle handle = nullptr;
85 CHECK_CALL(LGBM_DatasetCreateFromCSC(p_indptr, C_API_DTYPE_INT32, p_indices,
86 p_data, C_API_DTYPE_FLOAT64, nindptr, ndata,
87 nrow, R_CHAR_PTR(parameters), R_GET_PTR(reference), &handle));
88 R_SET_PTR(out, handle);
89 R_API_END();
90}
91
92LGBM_SE LGBM_DatasetCreateFromMat_R(LGBM_SE data,
93 LGBM_SE num_row,

Callers

nothing calls this directly

Calls 3

R_GET_PTRFunction · 0.50
R_SET_PTRFunction · 0.50

Tested by

no test coverage detected