Unverified Commit 656d2676 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

re-order includes (fixes #3132) (#3133)

parent f82e943c
......@@ -6,14 +6,14 @@
#ifndef LIGHTGBM_UTILS_THREADING_H_
#define LIGHTGBM_UTILS_THREADING_H_
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <algorithm>
#include <functional>
#include <vector>
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/openmp_wrapper.h>
namespace LightGBM {
class Threading {
......
......@@ -2,6 +2,15 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <string>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <sstream>
#include <utility>
#include <LightGBM/application.h>
#include <LightGBM/boosting.h>
......@@ -15,14 +24,6 @@
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
#include <string>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <sstream>
#include <utility>
#include "predictor.hpp"
namespace LightGBM {
......
......@@ -5,12 +5,6 @@
#ifndef LIGHTGBM_PREDICTOR_HPP_
#define LIGHTGBM_PREDICTOR_HPP_
#include <LightGBM/boosting.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
#include <string>
#include <cstdio>
#include <cstring>
......@@ -21,6 +15,12 @@
#include <utility>
#include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
namespace LightGBM {
/*!
......
......@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_BOOSTING_DART_H_
#define LIGHTGBM_BOOSTING_DART_H_
#include <LightGBM/boosting.h>
#include <string>
#include <algorithm>
#include <cstdio>
#include <fstream>
#include <vector>
#include <LightGBM/boosting.h>
#include "gbdt.h"
#include "score_updater.hpp"
......
......@@ -2,8 +2,13 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include "gbdt.h"
#include <chrono>
#include <ctime>
#include <sstream>
#include <LightGBM/metric.h>
#include <LightGBM/network.h>
#include <LightGBM/objective_function.h>
......@@ -11,10 +16,6 @@
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <chrono>
#include <ctime>
#include <sstream>
namespace LightGBM {
GBDT::GBDT()
......
......@@ -5,12 +5,6 @@
#ifndef LIGHTGBM_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/threading.h>
#include <string>
#include <algorithm>
#include <cstdio>
......@@ -22,6 +16,12 @@
#include <utility>
#include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/threading.h>
#include "score_updater.hpp"
namespace LightGBM {
......
......@@ -2,16 +2,17 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <string>
#include <sstream>
#include <vector>
#include <LightGBM/config.h>
#include <LightGBM/metric.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/common.h>
#include <string>
#include <sstream>
#include <vector>
#include "gbdt.h"
namespace LightGBM {
......
......@@ -2,12 +2,12 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include "gbdt.h"
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include "gbdt.h"
namespace LightGBM {
void GBDT::PredictRaw(const double* features, double* output, const PredictionEarlyStopInstance* early_stop) const {
......
......@@ -5,10 +5,6 @@
#ifndef LIGHTGBM_BOOSTING_GOSS_H_
#define LIGHTGBM_BOOSTING_GOSS_H_
#include <LightGBM/boosting.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/log.h>
#include <string>
#include <algorithm>
#include <chrono>
......@@ -16,6 +12,10 @@
#include <fstream>
#include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/log.h>
#include "gbdt.h"
#include "score_updater.hpp"
......
......@@ -2,15 +2,16 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/log.h>
#include <limits>
#include <algorithm>
#include <cmath>
#include <vector>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/log.h>
namespace LightGBM {
PredictionEarlyStopInstance CreateNone(const PredictionEarlyStopConfig&) {
......
......@@ -5,9 +5,6 @@
#ifndef LIGHTGBM_BOOSTING_RF_H_
#define LIGHTGBM_BOOSTING_RF_H_
#include <LightGBM/boosting.h>
#include <LightGBM/metric.h>
#include <string>
#include <cstdio>
#include <fstream>
......@@ -15,6 +12,9 @@
#include <utility>
#include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/metric.h>
#include "gbdt.h"
#include "score_updater.hpp"
......
......@@ -5,15 +5,15 @@
#ifndef LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#define LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#include <cstring>
#include <vector>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <LightGBM/tree.h>
#include <LightGBM/tree_learner.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <cstring>
#include <vector>
namespace LightGBM {
/*!
* \brief Used to store and update score for data
......
......@@ -2,6 +2,15 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <string>
#include <cstdio>
#include <functional>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <vector>
#include <LightGBM/c_api.h>
#include <LightGBM/boosting.h>
......@@ -18,14 +27,6 @@
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/threading.h>
#include <string>
#include <cstdio>
#include <functional>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <vector>
#include "application/predictor.hpp"
namespace LightGBM {
......
......@@ -2,17 +2,18 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <LightGBM/bin.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/file_io.h>
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <LightGBM/bin.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/file_io.h>
#include "dense_bin.hpp"
#include "multi_val_dense_bin.hpp"
#include "multi_val_sparse_bin.hpp"
......
......@@ -2,14 +2,15 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <limits>
#include <LightGBM/config.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/random.h>
#include <limits>
namespace LightGBM {
void Config::KV2Map(std::unordered_map<std::string, std::string>* params, const char* kv) {
......
......@@ -3,12 +3,6 @@
* Licensed under the MIT License. See LICENSE file in the project root for
* license information.
*/
#include <LightGBM/dataset.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/threading.h>
#include <chrono>
#include <cstdio>
......@@ -16,6 +10,13 @@
#include <sstream>
#include <unordered_map>
#include <LightGBM/dataset.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/threading.h>
namespace LightGBM {
const char* Dataset::binary_file_token =
......
......@@ -2,6 +2,9 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include <fstream>
#include <LightGBM/dataset_loader.h>
#include <LightGBM/network.h>
......@@ -10,8 +13,6 @@
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <fstream>
namespace LightGBM {
using json11::Json;
......
......@@ -6,12 +6,12 @@
#ifndef LIGHTGBM_IO_DENSE_BIN_HPP_
#define LIGHTGBM_IO_DENSE_BIN_HPP_
#include <LightGBM/bin.h>
#include <cstdint>
#include <cstring>
#include <vector>
#include <LightGBM/bin.h>
namespace LightGBM {
template <typename VAL_T, bool IS_4BIT>
......
......@@ -3,14 +3,15 @@
* Licensed under the MIT License. See LICENSE file in the project root for
* license information.
*/
#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>
#include <algorithm>
#include <sstream>
#include <unordered_map>
#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>
#ifdef USE_HDFS
#include <hdfs.h>
#endif
......
......@@ -18,15 +18,16 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/log.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <limits>
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/log.h>
namespace json11 {
static const int max_depth = 200;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment