Skip to content

Commit

Permalink
Adding btree heap
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjiuno committed Aug 4, 2022
1 parent 0e3ebee commit cb64c63
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ end_of_line = lf
charset = utf-8
indent_style = tab
indent_size = 4

[*.plantuml]
charset = utf-8
indent_style = space
indent_size = 4
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,14 @@ PST is formatted in multi layerd structure.

![](out/plantuml/base/layers.png)


LTP heap
LTP node heap

![](out/plantuml/base/ltp_heap.png)

LTP btree heap

![](out/plantuml/base/ltp_btheap.png)

LTP property context

![](out/plantuml/base/ltp_pc.png)
Expand Down
Binary file added out/plantuml/base/ltp_btheap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified out/plantuml/base/ltp_heap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 24 additions & 1 deletion plantuml/base.plantuml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ interface ReadFile {

@enduml
@startuml ltp_heap
title modelling ideas of LTP part: heap\n
title modelling ideas of LTP part: node heap\n
class NodeHeapUtil {
+ NodeHeap getHeapFrom(PstSubNode node)
}
Expand Down Expand Up @@ -97,6 +97,29 @@ end note

NodeHeapUtil --* NodeHeap
NodeHeap -- NodeHeapReader
@enduml
@startuml ltp_btheap
title modelling ideas of LTP part: btree heap\n
class BTHeapUtil {
+ BTHeapReader getBTHeapReaderFrom(NodeHeapReader heap, int hnid)
}

interface BTHeapReader {
- NodeHeapReader heap

+ BTHeapEntry[] list()
+ BTHeapEntry findByKey(byte[] key)
}

class BTHeapEntry {
+ byte[] key // 2, 4, 8 or 16 bytes
+ byte[] data // 1 ~ 32 bytes
}


BTHeapUtil --* BTHeapReader
BTHeapReader --* BTHeapEntry

@enduml
@startuml ltp_pc
title modelling ideas of LTP part: property context\n
Expand Down

0 comments on commit cb64c63

Please sign in to comment.