File view_statistic_non_decomposable_dense.hpp

namespace boosting
template<typename StatisticType>
class DenseNonDecomposableStatisticView : public boosting::DenseStatisticView<StatisticType>
#include <view_statistic_non_decomposable_dense.hpp>

Implements row-wise read and write access to the gradients and Hessians that have been calculated using a non-decomposable loss function and are stored in pre-allocated C-contiguous arrays.

Template Parameters:

StatisticType – The type of the gradients and Hessians

Public Types

using hessian_diagonal_const_iterator = DiagonalIterator<const StatisticType>

An iterator that provides read-only access to the Hessians that correspond to the diagonal of the matrix.

Public Functions

inline DenseNonDecomposableStatisticView(StatisticType *array, uint32 numRows, uint32 numGradients, uint32 numHessians)
Parameters:
  • array – A pointer to an array of template type T that stores the gradients and Hessians

  • numRows – The number of rows in the view

  • numGradients – The number of gradients in each row of the view

  • numHessians – The number of Hessians in each row of the view

inline DenseNonDecomposableStatisticView(const DenseNonDecomposableStatisticView<StatisticType> &other)
Parameters:

other – A reference to an object of type DenseNonDecomposableStatisticView that should be copied

inline DenseNonDecomposableStatisticView(DenseNonDecomposableStatisticView<StatisticType> &&other)
Parameters:

other – A reference to an object of type DenseNonDecomposableStatisticView that should be moved

inline virtual ~DenseNonDecomposableStatisticView() override
inline hessian_diagonal_const_iterator hessians_diagonal_cbegin(uint32 row) const

Returns a hessian_diagonal_const_iterator to the beginning of the Hessians that correspond to the diagonal of the Hessian matrix at a specific row.

Parameters:

row – The row

Returns:

A hessian_diagonal_const_iterator to the beginning

inline hessian_diagonal_const_iterator hessians_diagonal_cend(uint32 row) const

Returns a hessian_diagonal_const_iterator to the end of the Hessians that correspond to the diagonal of the Hessian matrix at a specific row.

Parameters:

row – The row

Returns:

A hessian_diagonal_const_iterator to the end