Platform.Data.Doublets C++
Loading...
Searching...
No Matches
InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h
Go to the documentation of this file.
2{
3 template <typename TLinksOptions>
6 InternalLinksSourcesRecursionlessSizeBalancedTreeMethods<TLinksOptions>, TLinksOptions>
7 {
8 public:
9 using LinksOptionsType = TLinksOptions;
10 using LinkAddressType = typename LinksOptionsType::LinkAddressType;
11 using LinkType = typename LinksOptionsType::LinkType;
12 using WriteHandlerType = typename LinksOptionsType::WriteHandlerType;
13 using ReadHandlerType = typename LinksOptionsType::ReadHandlerType;
14 // Intentional CRTP customization of the base tree algorithm.
15 // cppcheck-suppress duplInheritedMember
16 static constexpr auto Constants = LinksOptionsType::Constants;
19
20 public:
21 InternalLinksSourcesRecursionlessSizeBalancedTreeMethods(std::byte* linksDataParts, std::byte* linksIndexParts,
22 std::byte* header)
23 : base(linksDataParts, linksIndexParts, header)
24 {
25 }
26
27 public:
29 {
30 return &(this->GetLinkIndexPartReference(node).LeftAsSource);
31 }
32
33 public:
35 {
36 return &(this->GetLinkIndexPartReference(node).RightAsSource);
37 }
38
39 public:
41 {
42 return this->GetLinkIndexPartReference(node).LeftAsSource;
43 }
44
45 public:
47 {
48 return this->GetLinkIndexPartReference(node).RightAsSource;
49 }
50
51 public:
53 {
54 this->GetLinkIndexPartReference(node).LeftAsSource = left;
55 }
56
57 public:
59 {
60 this->GetLinkIndexPartReference(node).RightAsSource = right;
61 }
62
63 public:
65 {
66 return this->GetLinkIndexPartReference(node).SizeAsSource;
67 }
68
69 public:
71 {
72 this->GetLinkIndexPartReference(node).SizeAsSource = size;
73 }
74
75 public:
76 // Intentional CRTP customization of the base tree algorithm.
77 // cppcheck-suppress duplInheritedMember
79 {
80 return this->GetLinkIndexPartReference(link).RootAsSource;
81 }
82
83 public:
84 // Intentional CRTP customization of the base tree algorithm.
85 // cppcheck-suppress duplInheritedMember
87 {
88 return this->GetLinkDataPartReference(link).Source;
89 }
90
91 public:
92 // Intentional CRTP customization of the base tree algorithm.
93 // cppcheck-suppress duplInheritedMember
95 {
96 return this->GetLinkDataPartReference(link).Target;
97 }
98
99 public:
101 {
102 auto& link = this->GetLinkIndexPartReference(node);
103 link.LeftAsSource = 0;
104 link.RightAsSource = 0;
105 link.SizeAsSource = 0;
106 }
107
108 public:
109 // Intentional CRTP customization of the base tree algorithm.
110 // cppcheck-suppress duplInheritedMember
112 {
113 return this->SearchCore(this->GetTreeRoot(source), target);
114 }
115 };
116} // namespace Platform::Data::Doublets::Memory::Split::Generic
LinkAddressType SearchCore(LinkAddressType root, LinkAddressType key)
Definition InternalLinksRecursionlessSizeBalancedTreeMethodsBase.h:100
RawLinkIndexPart< LinkAddressType > & GetLinkIndexPartReference(LinkAddressType link)
Definition InternalLinksRecursionlessSizeBalancedTreeMethodsBase.h:68
RawLinkDataPart< LinkAddressType > & GetLinkDataPartReference(LinkAddressType link)
Definition InternalLinksRecursionlessSizeBalancedTreeMethodsBase.h:61
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:7
InternalLinksSourcesRecursionlessSizeBalancedTreeMethods(std::byte *linksDataParts, std::byte *linksIndexParts, std::byte *header)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:21
LinkAddressType GetLeft(LinkAddressType node)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:40
LinkAddressType GetSize(LinkAddressType node)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:64
static constexpr auto Constants
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:16
typename LinksOptionsType::WriteHandlerType WriteHandlerType
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:12
LinkAddressType Search(LinkAddressType source, LinkAddressType target)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:111
void SetLeft(LinkAddressType node, LinkAddressType left)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:52
void SetSize(LinkAddressType node, LinkAddressType size)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:70
LinkAddressType GetRight(LinkAddressType node)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:46
void ClearNode(LinkAddressType node)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:100
void SetRight(LinkAddressType node, LinkAddressType right)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:58
typename LinksOptionsType::ReadHandlerType ReadHandlerType
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:13
typename LinksOptionsType::LinkAddressType LinkAddressType
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:10
LinkAddressType * GetRightReference(LinkAddressType node)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:34
LinkAddressType GetTreeRoot(LinkAddressType link)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:78
LinkAddressType GetKeyPartValue(LinkAddressType link)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:94
TLinksOptions LinksOptionsType
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:9
typename LinksOptionsType::LinkType LinkType
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:11
LinkAddressType GetBasePartValue(LinkAddressType link)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:86
LinkAddressType * GetLeftReference(LinkAddressType node)
Definition InternalLinksSourcesRecursionlessSizeBalancedTreeMethods.h:28
Definition ExternalLinksRecursionlessSizeBalancedTreeMethodsBase.h:2