Remove deprecated C APIs. (#4266)
This commit is contained in:
parent
7b1b11390a
commit
fdcae024e7
@ -149,23 +149,6 @@ XGB_DLL int XGDMatrixCreateFromCSREx(const size_t* indptr,
|
||||
size_t nelem,
|
||||
size_t num_col,
|
||||
DMatrixHandle* out);
|
||||
/*!
|
||||
* \deprecated
|
||||
* \brief create a matrix content from CSR format
|
||||
* \param indptr pointer to row headers
|
||||
* \param indices findex
|
||||
* \param data fvalue
|
||||
* \param nindptr number of rows in the matrix + 1
|
||||
* \param nelem number of nonzero elements in the matrix
|
||||
* \param out created dmatrix
|
||||
* \return 0 when success, -1 when failure happens
|
||||
*/
|
||||
XGB_DLL int XGDMatrixCreateFromCSR(const bst_ulong *indptr,
|
||||
const unsigned *indices,
|
||||
const float *data,
|
||||
bst_ulong nindptr,
|
||||
bst_ulong nelem,
|
||||
DMatrixHandle *out);
|
||||
/*!
|
||||
* \brief create a matrix content from CSC format
|
||||
* \param col_ptr pointer to col headers
|
||||
@ -184,23 +167,7 @@ XGB_DLL int XGDMatrixCreateFromCSCEx(const size_t* col_ptr,
|
||||
size_t nelem,
|
||||
size_t num_row,
|
||||
DMatrixHandle* out);
|
||||
/*!
|
||||
* \deprecated
|
||||
* \brief create a matrix content from CSC format
|
||||
* \param col_ptr pointer to col headers
|
||||
* \param indices findex
|
||||
* \param data fvalue
|
||||
* \param nindptr number of rows in the matrix + 1
|
||||
* \param nelem number of nonzero elements in the matrix
|
||||
* \param out created dmatrix
|
||||
* \return 0 when success, -1 when failure happens
|
||||
*/
|
||||
XGB_DLL int XGDMatrixCreateFromCSC(const bst_ulong *col_ptr,
|
||||
const unsigned *indices,
|
||||
const float *data,
|
||||
bst_ulong nindptr,
|
||||
bst_ulong nelem,
|
||||
DMatrixHandle *out);
|
||||
|
||||
/*!
|
||||
* \brief create matrix content from dense matrix
|
||||
* \param data pointer to the data space
|
||||
|
||||
@ -304,20 +304,6 @@ XGB_DLL int XGDMatrixCreateFromCSREx(const size_t* indptr,
|
||||
API_END();
|
||||
}
|
||||
|
||||
XGB_DLL int XGDMatrixCreateFromCSR(const xgboost::bst_ulong* indptr,
|
||||
const unsigned *indices,
|
||||
const bst_float* data,
|
||||
xgboost::bst_ulong nindptr,
|
||||
xgboost::bst_ulong nelem,
|
||||
DMatrixHandle* out) {
|
||||
std::vector<size_t> indptr_(nindptr);
|
||||
for (xgboost::bst_ulong i = 0; i < nindptr; ++i) {
|
||||
indptr_[i] = static_cast<size_t>(indptr[i]);
|
||||
}
|
||||
return XGDMatrixCreateFromCSREx(&indptr_[0], indices, data,
|
||||
static_cast<size_t>(nindptr), static_cast<size_t>(nelem), 0, out);
|
||||
}
|
||||
|
||||
XGB_DLL int XGDMatrixCreateFromCSCEx(const size_t* col_ptr,
|
||||
const unsigned* indices,
|
||||
const bst_float* data,
|
||||
@ -374,20 +360,6 @@ XGB_DLL int XGDMatrixCreateFromCSCEx(const size_t* col_ptr,
|
||||
API_END();
|
||||
}
|
||||
|
||||
XGB_DLL int XGDMatrixCreateFromCSC(const xgboost::bst_ulong* col_ptr,
|
||||
const unsigned* indices,
|
||||
const bst_float* data,
|
||||
xgboost::bst_ulong nindptr,
|
||||
xgboost::bst_ulong nelem,
|
||||
DMatrixHandle* out) {
|
||||
std::vector<size_t> col_ptr_(nindptr);
|
||||
for (xgboost::bst_ulong i = 0; i < nindptr; ++i) {
|
||||
col_ptr_[i] = static_cast<size_t>(col_ptr[i]);
|
||||
}
|
||||
return XGDMatrixCreateFromCSCEx(&col_ptr_[0], indices, data,
|
||||
static_cast<size_t>(nindptr), static_cast<size_t>(nelem), 0, out);
|
||||
}
|
||||
|
||||
XGB_DLL int XGDMatrixCreateFromMat(const bst_float* data,
|
||||
xgboost::bst_ulong nrow,
|
||||
xgboost::bst_ulong ncol,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user