Merge pull request #3541 from rcurtin/fix-lr-includes
Fix include ordering for `LinearRegression`
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
### mlpack ?.?.?
|
||||
###### ????-??-??
|
||||
* Fix include ordering issue for `LinearRegression` (#3541).
|
||||
|
||||
### mlpack 4.2.1
|
||||
###### 2023-09-05
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
* 3-clause BSD license along with mlpack. If not, see
|
||||
* http://www.opensource.org/licenses/BSD-3-Clause for more information.
|
||||
*/
|
||||
#ifndef MLPACK_CORE_DISTRIBUTIONS_REGRESSION_DISTRIBUTION_HPP
|
||||
#define MLPACK_CORE_DISTRIBUTIONS_REGRESSION_DISTRIBUTION_HPP
|
||||
#ifndef MLPACK_CORE_DISTS_REGRESSION_DISTRIBUTION_HPP
|
||||
#define MLPACK_CORE_DISTS_REGRESSION_DISTRIBUTION_HPP
|
||||
|
||||
#include <mlpack/prereqs.hpp>
|
||||
#include <mlpack/core/dists/gaussian_distribution.hpp>
|
||||
|
||||
@@ -10,9 +10,8 @@
|
||||
* 3-clause BSD license along with mlpack. If not, see
|
||||
* http://www.opensource.org/licenses/BSD-3-Clause for more information.
|
||||
*/
|
||||
|
||||
#ifndef MLPACK_CORE_DISTRIBUTIONS_REGRESSION_DISTRIBUTION_IMPL_HPP
|
||||
#define MLPACK_CORE_DISTRIBUTIONS_REGRESSION_DISTRIBUTION_IMPL_HPP
|
||||
#ifndef MLPACK_CORE_DISTS_REGRESSION_DISTRIBUTION_IMPL_HPP
|
||||
#define MLPACK_CORE_DISTS_REGRESSION_DISTRIBUTION_IMPL_HPP
|
||||
|
||||
#include "regression_distribution.hpp"
|
||||
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
#ifndef MLPACK_METHODS_LINEAR_REGRESSION_LINEAR_REGRESSION_HPP
|
||||
#define MLPACK_METHODS_LINEAR_REGRESSION_LINEAR_REGRESSION_HPP
|
||||
|
||||
#include <mlpack/core.hpp>
|
||||
// Because RegressionDistribution uses LinearRegression internally, we need to
|
||||
// make sure we define LinearRegression fully before we define
|
||||
// RegressionDistribution. Therefore we have to include the prereqs first, and
|
||||
// include the core later.
|
||||
#include <mlpack/prereqs.hpp>
|
||||
|
||||
namespace mlpack {
|
||||
|
||||
@@ -168,4 +172,7 @@ class LinearRegression
|
||||
// Include implementation.
|
||||
#include "linear_regression_impl.hpp"
|
||||
|
||||
// Now that LinearRegression is defined, we can include the core.
|
||||
#include <mlpack/core.hpp>
|
||||
|
||||
#endif // MLPACK_METHODS_LINEAR_REGRESSION_HPP
|
||||
|
||||
Reference in New Issue
Block a user