Unverified Commit ac5f5e56 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

Revert "re-order includes (fixes #3132) (#3133)" (#3153)

This reverts commit 656d2676.
parent 675b552d
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#include <LightGBM/dataset.h>
#include <LightGBM/utils/common.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <LightGBM/dataset.h>
#include <LightGBM/utils/common.h>
namespace LightGBM { namespace LightGBM {
Metadata::Metadata() { Metadata::Metadata() {
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_IO_MULTI_VAL_DENSE_BIN_HPP_ #ifndef LIGHTGBM_IO_MULTI_VAL_DENSE_BIN_HPP_
#define LIGHTGBM_IO_MULTI_VAL_DENSE_BIN_HPP_ #define LIGHTGBM_IO_MULTI_VAL_DENSE_BIN_HPP_
#include <LightGBM/bin.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <algorithm> #include <algorithm>
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <LightGBM/bin.h>
#include <LightGBM/utils/openmp_wrapper.h>
namespace LightGBM { namespace LightGBM {
template <typename VAL_T> template <typename VAL_T>
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_IO_MULTI_VAL_SPARSE_BIN_HPP_ #ifndef LIGHTGBM_IO_MULTI_VAL_SPARSE_BIN_HPP_
#define LIGHTGBM_IO_MULTI_VAL_SPARSE_BIN_HPP_ #define LIGHTGBM_IO_MULTI_VAL_SPARSE_BIN_HPP_
#include <LightGBM/bin.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <algorithm> #include <algorithm>
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <LightGBM/bin.h>
#include <LightGBM/utils/openmp_wrapper.h>
namespace LightGBM { namespace LightGBM {
template <typename INDEX_T, typename VAL_T> template <typename INDEX_T, typename VAL_T>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#include "parser.hpp"
#include <string> #include <string>
#include <algorithm> #include <algorithm>
...@@ -10,8 +11,6 @@ ...@@ -10,8 +11,6 @@
#include <iostream> #include <iostream>
#include <memory> #include <memory>
#include "parser.hpp"
namespace LightGBM { namespace LightGBM {
void GetStatistic(const char* str, int* comma_cnt, int* tab_cnt, int* colon_cnt) { void GetStatistic(const char* str, int* comma_cnt, int* tab_cnt, int* colon_cnt) {
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_IO_PARSER_HPP_ #ifndef LIGHTGBM_IO_PARSER_HPP_
#define LIGHTGBM_IO_PARSER_HPP_ #define LIGHTGBM_IO_PARSER_HPP_
#include <unordered_map>
#include <utility>
#include <vector>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <unordered_map>
#include <utility>
#include <vector>
namespace LightGBM { namespace LightGBM {
class CSVParser: public Parser { class CSVParser: public Parser {
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
#ifndef LIGHTGBM_IO_SPARSE_BIN_HPP_ #ifndef LIGHTGBM_IO_SPARSE_BIN_HPP_
#define LIGHTGBM_IO_SPARSE_BIN_HPP_ #define LIGHTGBM_IO_SPARSE_BIN_HPP_
#include <LightGBM/bin.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <algorithm> #include <algorithm>
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
...@@ -13,10 +17,6 @@ ...@@ -13,10 +17,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <LightGBM/bin.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
namespace LightGBM { namespace LightGBM {
template <typename VAL_T> template <typename VAL_T>
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#include <functional>
#include <iomanip>
#include <sstream>
#include <LightGBM/tree.h> #include <LightGBM/tree.h>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/threading.h> #include <LightGBM/utils/threading.h>
#include <functional>
#include <iomanip>
#include <sstream>
namespace LightGBM { namespace LightGBM {
Tree::Tree(int max_leaves) Tree::Tree(int max_leaves)
......
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#include <LightGBM/application.h>
#include <iostream> #include <iostream>
#include <LightGBM/application.h>
#include "network/linkers.h" #include "network/linkers.h"
int main(int argc, char** argv) { int main(int argc, char** argv) {
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
#ifndef LIGHTGBM_METRIC_BINARY_METRIC_HPP_ #ifndef LIGHTGBM_METRIC_BINARY_METRIC_HPP_
#define LIGHTGBM_METRIC_BINARY_METRIC_HPP_ #define LIGHTGBM_METRIC_BINARY_METRIC_HPP_
#include <LightGBM/metric.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#include <LightGBM/metric.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
namespace LightGBM { namespace LightGBM {
/*! /*!
......
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#include <LightGBM/metric.h>
#include <LightGBM/utils/log.h>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <vector> #include <vector>
#include <LightGBM/metric.h>
#include <LightGBM/utils/log.h>
namespace LightGBM { namespace LightGBM {
/*! \brief Declaration for some static members */ /*! \brief Declaration for some static members */
......
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
#ifndef LIGHTGBM_METRIC_MAP_METRIC_HPP_ #ifndef LIGHTGBM_METRIC_MAP_METRIC_HPP_
#define LIGHTGBM_METRIC_MAP_METRIC_HPP_ #define LIGHTGBM_METRIC_MAP_METRIC_HPP_
#include <string>
#include <algorithm>
#include <sstream>
#include <vector>
#include <LightGBM/metric.h> #include <LightGBM/metric.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <string>
#include <algorithm>
#include <sstream>
#include <vector>
namespace LightGBM { namespace LightGBM {
class MapMetric:public Metric { class MapMetric:public Metric {
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_METRIC_MULTICLASS_METRIC_HPP_ #ifndef LIGHTGBM_METRIC_MULTICLASS_METRIC_HPP_
#define LIGHTGBM_METRIC_MULTICLASS_METRIC_HPP_ #define LIGHTGBM_METRIC_MULTICLASS_METRIC_HPP_
#include <LightGBM/metric.h>
#include <LightGBM/utils/log.h>
#include <string> #include <string>
#include <cmath> #include <cmath>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <LightGBM/metric.h>
#include <LightGBM/utils/log.h>
namespace LightGBM { namespace LightGBM {
/*! /*!
* \brief Metric for multiclass task. * \brief Metric for multiclass task.
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
#ifndef LIGHTGBM_METRIC_RANK_METRIC_HPP_ #ifndef LIGHTGBM_METRIC_RANK_METRIC_HPP_
#define LIGHTGBM_METRIC_RANK_METRIC_HPP_ #define LIGHTGBM_METRIC_RANK_METRIC_HPP_
#include <string>
#include <sstream>
#include <vector>
#include <LightGBM/metric.h> #include <LightGBM/metric.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <string>
#include <sstream>
#include <vector>
namespace LightGBM { namespace LightGBM {
class NDCGMetric:public Metric { class NDCGMetric:public Metric {
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_METRIC_REGRESSION_METRIC_HPP_ #ifndef LIGHTGBM_METRIC_REGRESSION_METRIC_HPP_
#define LIGHTGBM_METRIC_REGRESSION_METRIC_HPP_ #define LIGHTGBM_METRIC_REGRESSION_METRIC_HPP_
#include <LightGBM/metric.h>
#include <LightGBM/utils/log.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <vector> #include <vector>
#include <LightGBM/metric.h>
#include <LightGBM/utils/log.h>
namespace LightGBM { namespace LightGBM {
/*! /*!
* \brief Metric for regression task. * \brief Metric for regression task.
......
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
#ifndef LIGHTGBM_METRIC_XENTROPY_METRIC_HPP_ #ifndef LIGHTGBM_METRIC_XENTROPY_METRIC_HPP_
#define LIGHTGBM_METRIC_XENTROPY_METRIC_HPP_ #define LIGHTGBM_METRIC_XENTROPY_METRIC_HPP_
#include <string>
#include <algorithm>
#include <sstream>
#include <vector>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <LightGBM/metric.h> #include <LightGBM/metric.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <string>
#include <algorithm>
#include <sstream>
#include <vector>
/* /*
* Implements three related metrics: * Implements three related metrics:
* *
......
...@@ -2,15 +2,14 @@ ...@@ -2,15 +2,14 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#include <LightGBM/network.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <LightGBM/network.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
namespace LightGBM { namespace LightGBM {
......
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
#ifndef LIGHTGBM_NETWORK_LINKERS_H_ #ifndef LIGHTGBM_NETWORK_LINKERS_H_
#define LIGHTGBM_NETWORK_LINKERS_H_ #define LIGHTGBM_NETWORK_LINKERS_H_
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
#include <LightGBM/network.h>
#include <LightGBM/utils/common.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <chrono> #include <chrono>
...@@ -13,11 +18,6 @@ ...@@ -13,11 +18,6 @@
#include <thread> #include <thread>
#include <vector> #include <vector>
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
#include <LightGBM/network.h>
#include <LightGBM/utils/common.h>
#ifdef USE_SOCKET #ifdef USE_SOCKET
#include "socket_wrapper.hpp" #include "socket_wrapper.hpp"
#endif #endif
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
*/ */
#ifdef USE_SOCKET #ifdef USE_SOCKET
#include <LightGBM/config.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/text_reader.h>
#include <string> #include <string>
#include <chrono> #include <chrono>
#include <cstring> #include <cstring>
...@@ -12,10 +16,6 @@ ...@@ -12,10 +16,6 @@
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include <LightGBM/config.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/text_reader.h>
#include "linkers.h" #include "linkers.h"
namespace LightGBM { namespace LightGBM {
......
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#include <cstdlib>
#include <cstring>
#include <LightGBM/network.h> #include <LightGBM/network.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <cstdlib>
#include <cstring>
#include "linkers.h" #include "linkers.h"
namespace LightGBM { namespace LightGBM {
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
#define LIGHTGBM_NETWORK_SOCKET_WRAPPER_HPP_ #define LIGHTGBM_NETWORK_SOCKET_WRAPPER_HPP_
#ifdef USE_SOCKET #ifdef USE_SOCKET
#include <LightGBM/utils/log.h>
#include <string> #include <string>
#include <cerrno> #include <cerrno>
#include <cstdlib> #include <cstdlib>
#include <unordered_set> #include <unordered_set>
#include <LightGBM/utils/log.h>
#if defined(_WIN32) #if defined(_WIN32)
#ifdef _MSC_VER #ifdef _MSC_VER
......
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