Skip to content

Commit

Permalink
rename IndexedFeatures::min method into featureMin
Browse files Browse the repository at this point in the history
  • Loading branch information
Vika-F committed Sep 24, 2024
1 parent 98c0ca0 commit 4b74e79
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class IndexedFeatures
}

//returns right border of the bin if the feature is a binned one
ModelFPType min(size_t iCol) const
ModelFPType featureMin(size_t iCol) const
{
DAAL_ASSERT(isBinned(iCol));
return _entries[iCol].min;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ size_t UnorderedRespHelperRandom<algorithmFPType, cpu>::genRandomBinIdx(const In
{
//randomly select a histogram split index
algorithmFPType fidx = 0;
algorithmFPType minval = minidx ? this->indexedFeatures().binRightBorder(iFeature, minidx - 1) : this->indexedFeatures().min(iFeature);
algorithmFPType minval = minidx ? this->indexedFeatures().binRightBorder(iFeature, minidx - 1) : this->indexedFeatures().featureMin(iFeature);
algorithmFPType maxval = this->indexedFeatures().binRightBorder(iFeature, maxidx);
size_t mid;
size_t l = minidx;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ size_t OrderedRespHelperRandom<algorithmFPType, cpu>::genRandomBinIdx(const Inde
{
//randomly select a histogram split index
algorithmFPType fidx = 0;
algorithmFPType minval = minidx ? this->indexedFeatures().binRightBorder(iFeature, minidx - 1) : this->indexedFeatures().min(iFeature);
algorithmFPType minval = minidx ? this->indexedFeatures().binRightBorder(iFeature, minidx - 1) : this->indexedFeatures().featureMin(iFeature);
algorithmFPType maxval = this->indexedFeatures().binRightBorder(iFeature, maxidx);
size_t mid;
size_t l = minidx;
Expand Down
12 changes: 0 additions & 12 deletions cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_impl.i
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,6 @@ namespace internal

#define __KDTREE_NULLDIMENSION (static_cast<size_t>(-1))

template <CpuType cpu, typename T>
inline const T & min(const T & a, const T & b)
{
return !(b < a) ? a : b;
}

template <CpuType cpu, typename T>
inline const T & max(const T & a, const T & b)
{
return (a < b) ? b : a;
}

template <typename T, CpuType cpu>
class Stack
{
Expand Down

0 comments on commit 4b74e79

Please sign in to comment.