From 59e171576c5f9609167b11a5fb08e2fdb5678163 Mon Sep 17 00:00:00 2001 From: Michael Rapp Date: Sun, 12 Nov 2023 13:09:48 +0100 Subject: [PATCH] Move class IBoostingStatistics to namespace "boosting". --- .../mlrl/boosting/statistics/statistics.hpp | 62 ++++++++++--------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/cpp/subprojects/boosting/include/mlrl/boosting/statistics/statistics.hpp b/cpp/subprojects/boosting/include/mlrl/boosting/statistics/statistics.hpp index 4774f39bb4..3a86a007df 100644 --- a/cpp/subprojects/boosting/include/mlrl/boosting/statistics/statistics.hpp +++ b/cpp/subprojects/boosting/include/mlrl/boosting/statistics/statistics.hpp @@ -9,32 +9,36 @@ #include -/** - * Defines an interface for all classes that provide access to gradients and Hessians which serve as the basis for - * learning a new boosted rule or refining an existing one. - */ -class IBoostingStatistics : public IStatistics { - public: - - virtual ~IBoostingStatistics() {}; - - /** - * A visitor function for handling score matrices of the type `CContiguousConstView`. - */ - typedef std::function&)> DenseScoreMatrixVisitor; - - /** - * A visitor function for handling score matrices of the type `SparseSetMatrix`. - */ - typedef std::function&)> SparseScoreMatrixVisitor; - - /** - * Invokes one of the given visitor functions, depending on which one is able to handle the type of matrix that - * is used to store the currently predicted scores. - * - * @param denseVisitor The visitor function for handling objects of the type `CContiguousConstView` - * @param sparseVisitor The visitor function for handling objects of the type `SparseSetMatrix` - */ - virtual void visitScoreMatrix(DenseScoreMatrixVisitor denseVisitor, - SparseScoreMatrixVisitor sparseVisitor) const = 0; -}; +namespace boosting { + + /** + * Defines an interface for all classes that provide access to gradients and Hessians which serve as the basis for + * learning a new boosted rule or refining an existing one. + */ + class IBoostingStatistics : public IStatistics { + public: + + virtual ~IBoostingStatistics() {}; + + /** + * A visitor function for handling score matrices of the type `CContiguousConstView`. + */ + typedef std::function&)> DenseScoreMatrixVisitor; + + /** + * A visitor function for handling score matrices of the type `SparseSetMatrix`. + */ + typedef std::function&)> SparseScoreMatrixVisitor; + + /** + * Invokes one of the given visitor functions, depending on which one is able to handle the type of matrix + * that is used to store the currently predicted scores. + * + * @param denseVisitor The visitor function for handling objects of the type `CContiguousConstView` + * @param sparseVisitor The visitor function for handling objects of the type `SparseSetMatrix` + */ + virtual void visitScoreMatrix(DenseScoreMatrixVisitor denseVisitor, + SparseScoreMatrixVisitor sparseVisitor) const = 0; + }; + +}