MCPcopy Create free account
hub / github.com/catboost/catboost / GetParent

Method GetParent

library/cpp/par/distr_tree.cpp:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 TVector<TDistrTree> Group;
50
51 int GetParent(int id) {
52 int res = id, parent = id;
53 while (parent != -1) {
54 res = parent;
55 parent = Group2parent[res];
56 if (parent == res) {
57 Y_ASSERT(id == res);
58 break;
59 }
60 }
61 Group2parent[id] = res;
62 return res;
63 }
64 TDistrTreeConstructor(int nodeCount) {
65 // TVector<TTreeConnectorCost> usedLinks;
66 Group2parent.resize(nodeCount, -1);

Callers 2

ConstructTreeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected