| 70 | ~BinMapper(); |
| 71 | |
| 72 | bool CheckAlign(const BinMapper& other) const { |
| 73 | if (num_bin_ != other.num_bin_) { |
| 74 | return false; |
| 75 | } |
| 76 | if (missing_type_ != other.missing_type_) { |
| 77 | return false; |
| 78 | } |
| 79 | if (bin_type_ == BinType::NumericalBin) { |
| 80 | for (int i = 0; i < num_bin_; ++i) { |
| 81 | if (bin_upper_bound_[i] != other.bin_upper_bound_[i]) { |
| 82 | return false; |
| 83 | } |
| 84 | } |
| 85 | } else { |
| 86 | for (int i = 0; i < num_bin_; i++) { |
| 87 | if (bin_2_categorical_[i] != other.bin_2_categorical_[i]) { |
| 88 | return false; |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | return true; |
| 93 | } |
| 94 | |
| 95 | /*! \brief Get number of bins */ |
| 96 | inline int num_bin() const { return num_bin_; } |
no outgoing calls
no test coverage detected