Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grype/pharo-adaptiveradixtree
Adaptive Radix Tree implemented in Pharo
https://github.com/grype/pharo-adaptiveradixtree
pharo pharo-smalltalk tree-structure
Last synced: 6 days ago
JSON representation
Adaptive Radix Tree implemented in Pharo
- Host: GitHub
- URL: https://github.com/grype/pharo-adaptiveradixtree
- Owner: grype
- License: mit
- Created: 2019-12-21T08:22:09.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-23T06:56:59.000Z (over 3 years ago)
- Last Synced: 2024-12-18T21:17:32.013Z (6 days ago)
- Topics: pharo, pharo-smalltalk, tree-structure
- Language: Smalltalk
- Size: 132 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AdaptiveRadixTree
Adaptive Radix Tree implemented in [Pharo](https://pharo.org).
Implemented as a specialized `Dictionary` and behaves like a proper `Collection`.
See [The Adaptive Radix Tree: ARTful Indexing for Main-Memory Databases](https://db.in.tum.de/~leis/papers/ART.pdf)
## Installation
```smalltalk
Metacello new
baseline: 'AdaptiveRadixTree';
repository: 'github://grype/Pharo-AdaptiveRadixTree';
load.
```## Examples
```smalltalk
tree := ArtTree new.
tree at: 'hello' put: 'world'.
tree at: 'hello'. "'value'"
tree removeKey: 'hello'.
tree do: [:each | ... ].
tree asDictionary.
tree associations.
``````smalltalk
t := ArtTree new.
stream := '/usr/share/dict/words' asFileReference readStream.[ stream atEnd ] whileFalse: [
stream nextLine ifNotEmpty: [ :line | t at: line put: line ].
].
t size. "235886"selection := t select: [ :each | each asLowercase beginsWith: 'pharo' ].
selection size. "3"(ArtNode gtMapViewBuilder value: selection root) inspect.
```![Visualization](resources/pharo-art.png)