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

Class TNode

library/cpp/containers/comptrie/node.h:26–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 }
25
26 class TNode {
27 public:
28 TNode();
29 // Processes epsilon links and sets ForwardOffset to correct value. Assumes an epsilon link doesn't point to an epsilon link.
30 TNode(const char* data, size_t offset, const ILeafSkipper& skipFunction);
31
32 size_t GetOffset() const {
33 return Offset;
34 }
35
36 size_t GetLeafOffset() const {
37 return Offsets[D_FINAL];
38 }
39 size_t GetLeafLength() const {
40 return LeafLength;
41 }
42 size_t GetCoreLength() const {
43 return CoreLength;
44 }
45
46 size_t GetOffsetByDirection(TDirection direction) const {
47 return Offsets[direction];
48 }
49
50 size_t GetForwardOffset() const {
51 return Offsets[D_NEXT];
52 }
53 size_t GetLeftOffset() const {
54 return Offsets[D_LEFT];
55 }
56 size_t GetRightOffset() const {
57 return Offsets[D_RIGHT];
58 }
59 char GetLabel() const {
60 return Label;
61 }
62
63 bool IsFinal() const {
64 return GetLeafOffset() != 0;
65 }
66
67 bool HasEpsilonLinkForward() const {
68 return GetForwardOffset() > Offset + CoreLength;
69 }
70
71 private:
72 size_t Offsets[D_MAX];
73 size_t Offset;
74 size_t LeafLength;
75 size_t CoreLength;
76
77 char Label;
78 };
79
80}

Callers 3

MeasureSubtrieMethod · 0.70
FillCentralWordMethod · 0.70
FindDescendantsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected