File view_statistic_decomposable_dense.hpp

namespace boosting
template<typename StatisticType>
class DenseDecomposableStatisticView : public AllocatedCContiguousView<StatisticType>
#include <view_statistic_decomposable_dense.hpp>

Implements row-wise read and write access to the gradients and Hessians that have been calculated using a 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 gradient_const_iterator = AllocatedCContiguousView<StatisticType>::value_const_iterator

An iterator that provides read-only access to the gradients.

using gradient_iterator = AllocatedCContiguousView<StatisticType>::value_iterator

An iterator that provides access to the gradients and allows to modify them.

using hessian_const_iterator = AllocatedCContiguousView<StatisticType>::value_const_iterator

An iterator that provides read-only access to the Hessians.

using hessian_iterator = AllocatedCContiguousView<StatisticType>::value_iterator

An iterator that provides access to the Hessians and allows to modify them.

Public Functions

DenseDecomposableStatisticView(uint32 numRows, uint32 numCols)
Parameters:
  • numRows – The number of rows in the view

  • numCols – The number of columns in the view

DenseDecomposableStatisticView(DenseDecomposableStatisticView<StatisticType> &&other)
Parameters:

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

inline virtual ~DenseDecomposableStatisticView() override
gradient_const_iterator gradients_cbegin(uint32 row) const

Returns a gradient_const_iterator to the beginning of the gradients at a specific row.

Parameters:

row – The row

Returns:

A gradient_const_iterator to the beginning of the given row

gradient_const_iterator gradients_cend(uint32 row) const

Returns a gradient_const_iterator to the end of the gradients at a specific row.

Parameters:

row – The row

Returns:

A gradient_const_iterator to the end of the given row

gradient_iterator gradients_begin(uint32 row)

Returns a gradient_iterator to the beginning of the gradients at a specific row.

Parameters:

row – The row

Returns:

A gradient_iterator to the beginning of the given row

gradient_iterator gradients_end(uint32 row)

Returns a gradient_iterator to the end of the gradients at a specific row.

Parameters:

row – The row

Returns:

A gradient_iterator to the end of the given row

hessian_const_iterator hessians_cbegin(uint32 row) const

Returns a hessian_const_iterator to the beginning of the Hessians at a specific row.

Parameters:

row – The row

Returns:

A hessian_const_iterator to the beginning of the given row

hessian_const_iterator hessians_cend(uint32 row) const

Returns a hessian_const_iterator to the end of the Hessians at a specific row.

Parameters:

row – The row

Returns:

A hessian_const_iterator to the end of the given row

hessian_iterator hessians_begin(uint32 row)

Returns a hessian_iterator to the beginning of the Hessians at a specific row.

Parameters:

row – The row

Returns:

A hessian_iterator to the beginning of the given row

hessian_iterator hessians_end(uint32 row)

Returns a hessian_iterator to the end of the Hessians at a specific row.

Parameters:

row – The row

Returns:

A hessian_iterator to the end of the given row

uint32 getNumRows() const

Returns the number of rows in the view.

Returns:

The number of rows

uint32 getNumCols() const

Returns the number of columns in the view.

Returns:

The number of columns