File vector_statistic_dense.hpp¶
-
template<typename View, typename MemoryAllocator = DefaultMemoryAllocator>
class DenseStatisticVectorAllocator : public View¶ - #include <vector_statistic_dense.hpp>
Allocates the memory, a
DenseStatisticVectorViewprovides access to.- Template Parameters:
View – The type of the view
MemoryAllocator – The type of the memory allocator to be used
Public Types
Public Functions
-
inline explicit DenseStatisticVectorAllocator(uint32 numGradients, uint32 numHessians, bool init = false)¶
- Parameters:
numGradients – The number of gradients in the view
numHessians – The number of Hessians in the view
init – True, if all elements in the view should be value-initialized, false otherwise
-
inline DenseStatisticVectorAllocator(const DenseStatisticVectorAllocator<View, MemoryAllocator> &other)¶
- Parameters:
other – A reference to an object of type
DenseStatisticVectorAllocatorthat should be copied
-
inline DenseStatisticVectorAllocator(DenseStatisticVectorAllocator<View, MemoryAllocator> &&other)¶
- Parameters:
other – A reference to an object of type
DenseStatisticVectorAllocatorthat should be moved
-
inline virtual ~DenseStatisticVectorAllocator() override¶
-
namespace boosting
-
template<typename StatisticType>
class DenseStatisticVectorView : public Vector<StatisticType>¶ - #include <vector_statistic_dense.hpp>
A one-dimensional view that provides access to gradients and Hessians that are stored in a single pre-allocated array.
- Template Parameters:
StatisticType – The type of the gradient and Hessians
Subclassed by boosting::DenseNonDecomposableStatisticVectorView< StatisticType >
Public Types
-
using statistic_type = StatisticType¶
The type of the gradients and Hessians.
-
using gradient_iterator = View<StatisticType>::iterator¶
An iterator that provides access to the gradients in the view and allows to modify them.
-
using gradient_const_iterator = View<StatisticType>::const_iterator¶
An iterator that provides read-only access to the gradients in the view.
-
using hessian_iterator = View<StatisticType>::iterator¶
An iterator that provides access to the Hessians in the view and allows to modify them.
-
using hessian_const_iterator = View<StatisticType>::const_iterator¶
An iterator that provides read-only access to the Hessians in the view.
Public Functions
-
inline DenseStatisticVectorView(StatisticType *array, uint32 numGradients, uint32 numHessians)¶
- Parameters:
array – A pointer to an array of template type
StatisticTypethat stores the gradients and HessiansnumGradients – The number of gradients in the view
numHessians – The number of Hessians in the view
-
inline DenseStatisticVectorView(const DenseStatisticVectorView<StatisticType> &other)¶
- Parameters:
other – A reference to an object of type
DenseStatisticVectorViewthat should be copied
-
inline DenseStatisticVectorView(DenseStatisticVectorView<StatisticType> &&other)¶
- Parameters:
other – A reference to an object of type
DenseStatisticVectorViewthat should be moved
-
inline virtual ~DenseStatisticVectorView() override¶
-
inline gradient_iterator gradients_begin()¶
Returns a
gradient_iteratorto the beginning of the gradients.- Returns:
A
gradient_iteratorto the beginning
-
inline gradient_iterator gradients_end()¶
Returns a
gradient_iteratorto the end of the gradients.- Returns:
A
gradient_iteratorto the end
-
inline gradient_const_iterator gradients_cbegin() const¶
Returns a
gradient_const_iteratorto the beginning of the gradients.- Returns:
A
gradient_const_iteratorto the beginning
-
inline gradient_const_iterator gradients_cend() const¶
Returns a
gradient_const_iteratorto the end of the gradients.- Returns:
A
gradient_const_iteratorto the end
-
inline hessian_iterator hessians_begin()¶
Returns a
hessian_iteratorto the beginning of the Hessians.- Returns:
A
hessian_iteratorto the beginning
-
inline hessian_iterator hessians_end()¶
Returns a
hessian_iteratorto the end of the Hessians.- Returns:
A
hessian_iteratorto the end
-
inline hessian_const_iterator hessians_cbegin() const¶
Returns a
hessian_const_iteratorto the beginning of the Hessians.- Returns:
A
hessian_const_iteratorto the beginning
-
inline hessian_const_iterator hessians_cend() const¶
Returns a
hessian_const_iteratorto the end of the Hessians.- Returns:
A
hessian_const_iteratorto the end
-
template<typename StatisticType>