diff --git a/include/xgboost/c_api.h b/include/xgboost/c_api.h index 787397ad9454..166ba833aec7 100644 --- a/include/xgboost/c_api.h +++ b/include/xgboost/c_api.h @@ -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 diff --git a/src/c_api/c_api.cc b/src/c_api/c_api.cc index cb7240448e5b..9092918031c7 100644 --- a/src/c_api/c_api.cc +++ b/src/c_api/c_api.cc @@ -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 indptr_(nindptr); - for (xgboost::bst_ulong i = 0; i < nindptr; ++i) { - indptr_[i] = static_cast(indptr[i]); - } - return XGDMatrixCreateFromCSREx(&indptr_[0], indices, data, - static_cast(nindptr), static_cast(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 col_ptr_(nindptr); - for (xgboost::bst_ulong i = 0; i < nindptr; ++i) { - col_ptr_[i] = static_cast(col_ptr[i]); - } - return XGDMatrixCreateFromCSCEx(&col_ptr_[0], indices, data, - static_cast(nindptr), static_cast(nelem), 0, out); -} - XGB_DLL int XGDMatrixCreateFromMat(const bst_float* data, xgboost::bst_ulong nrow, xgboost::bst_ulong ncol,