xgboost
src
common
version.h
Go to the documentation of this file.
1
4
#ifndef XGBOOST_COMMON_VERSION_H_
5
#define XGBOOST_COMMON_VERSION_H_
6
7
#include <dmlc/io.h>
8
#include <string>
9
#include <tuple>
10
11
#include "
xgboost/base.h
"
12
13
namespace
xgboost
{
14
class
Json;
15
// a static class for handling version info
16
struct
Version
{
17
using
TripletT
= std::tuple<XGBoostVersionT, XGBoostVersionT, XGBoostVersionT>;
18
static
const
TripletT
kInvalid
;
19
20
// Save/Load version info to JSON document
21
static
TripletT
Load
(
Json
const
& in);
22
static
void
Save
(
Json
* out);
23
24
// Save/Load version info to dmlc::Stream
25
static
Version::TripletT
Load
(dmlc::Stream* fi);
26
static
void
Save
(dmlc::Stream* fo);
27
28
static
std::string
String
(
TripletT
const
& version);
29
static
TripletT
Self
();
30
31
static
bool
Same
(
TripletT
const
& triplet);
32
};
33
34
}
// namespace xgboost
35
#endif // XGBOOST_COMMON_VERSION_H_
xgboost::Version::TripletT
std::tuple< XGBoostVersionT, XGBoostVersionT, XGBoostVersionT > TripletT
Definition:
version.h:17
base.h
defines configuration macros of xgboost.
xgboost::Version::Save
static void Save(Json *out)
xgboost::Version::Same
static bool Same(TripletT const &triplet)
xgboost::Version::kInvalid
static const TripletT kInvalid
Definition:
version.h:18
xgboost::Version::Self
static TripletT Self()
xgboost::Version
Definition:
version.h:16
xgboost::Json
Data structure representing JSON format.
Definition:
json.h:352
xgboost::Version::Load
static TripletT Load(Json const &in)
xgboost::Version::String
static std::string String(TripletT const &version)
xgboost
namespace of xgboost
Definition:
base.h:110
Generated on Sun May 8 2022 06:22:16 for xgboost by
1.8.17