-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace class IntegerBitMatrix with new class BitDecomposableStatisti…
…cView.
- Loading branch information
1 parent
654178e
commit f95c1d9
Showing
5 changed files
with
62 additions
and
34 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
cpp/subprojects/boosting/include/mlrl/boosting/data/view_statistic_decomposable_bit.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* @author Michael Rapp ([email protected]) | ||
*/ | ||
#pragma once | ||
|
||
#include "mlrl/common/data/view_matrix_bit.hpp" | ||
#include "mlrl/common/data/view_matrix_composite.hpp" | ||
|
||
namespace boosting { | ||
|
||
/** | ||
* 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 bit matrices. | ||
*/ | ||
class BitDecomposableStatisticView | ||
: public CompositeMatrix<AllocatedBitMatrix<uint32>, AllocatedBitMatrix<uint32>> { | ||
public: | ||
|
||
/** | ||
* @param numRows The number of rows in the view | ||
* @param numCols The number of columns in the view | ||
* @param numBits The number of bits per statistic in the view | ||
*/ | ||
BitDecomposableStatisticView(uint32 numRows, uint32 numCols, uint32 numBits); | ||
|
||
/** | ||
* @param other A reference to an object of type `BitDecomposableStatisticView` that should be copied | ||
*/ | ||
BitDecomposableStatisticView(BitDecomposableStatisticView&& other); | ||
|
||
virtual ~BitDecomposableStatisticView() override {} | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
cpp/subprojects/boosting/src/mlrl/boosting/data/view_statistic_decomposable_bit.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "mlrl/boosting/data/view_statistic_decomposable_bit.hpp" | ||
|
||
#include "mlrl/boosting/util/math.hpp" | ||
|
||
namespace boosting { | ||
|
||
BitDecomposableStatisticView::BitDecomposableStatisticView(uint32 numRows, uint32 numCols, uint32 numBits) | ||
: CompositeMatrix<AllocatedBitMatrix<uint32>, AllocatedBitMatrix<uint32>>( | ||
AllocatedBitMatrix<uint32>(numRows, numCols, numBits), | ||
AllocatedBitMatrix<uint32>(numRows, util::triangularNumber(numCols), numBits), numRows, numCols) {} | ||
|
||
BitDecomposableStatisticView::BitDecomposableStatisticView(BitDecomposableStatisticView&& other) | ||
: CompositeMatrix<AllocatedBitMatrix<uint32>, AllocatedBitMatrix<uint32>>(std::move(other)) {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
cpp/subprojects/common/include/mlrl/common/data/matrix_bit_integer.hpp
This file was deleted.
Oops, something went wrong.