"vscode:/vscode.git/clone" did not exist on "5b4b5d6589d43e6f01221b3ccc9563d09110be4f"
Unverified Commit 656d2676 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

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

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