MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / ArgMin

Method ArgMin

include/LightGBM/utils/array_args.h:69–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 }
68
69 inline static size_t ArgMin(const std::vector<VAL_T>& array) {
70 if (array.empty()) {
71 return 0;
72 }
73 size_t arg_min = 0;
74 for (size_t i = 1; i < array.size(); ++i) {
75 if (array[i] < array[arg_min]) {
76 arg_min = i;
77 }
78 }
79 return arg_min;
80 }
81
82 inline static size_t ArgMax(const VAL_T* array, size_t n) {
83 if (n <= 0) {

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected