Implement a DMatrix Proxy. (#5803)

This commit is contained in:
Jiaming Yuan
2020-06-29 15:03:10 +08:00
committed by GitHub
parent 47c89775d6
commit 90a9c68874
4 changed files with 181 additions and 0 deletions

View File

@@ -441,6 +441,13 @@ class DMatrix {
DMatrix() = default;
/*! \brief meta information of the dataset */
virtual MetaInfo& Info() = 0;
virtual void SetInfo(const char *key, const void *dptr, DataType dtype,
size_t num) {
this->Info().SetInfo(key, dptr, dtype, num);
}
virtual void SetInfo(const char* key, std::string const& interface_str) {
this->Info().SetInfo(key, interface_str);
}
/*! \brief meta information of the dataset */
virtual const MetaInfo& Info() const = 0;
/**