BSD Ports

devel/p5-Tree-Trie 1.9 FreeBSD

Data structure optimized for prefix lookup

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Categories
devel, perl5
Package size
20.0 KiB, 44.2 KiB installed

Description

This module implements a trie data structure. The term "trie" comes from the word retrieval, but is generally pronounced like "try". A trie is a tree structure (or directed acyclic graph), the nodes of which represent letters in a word. For example, the final lookup for the word 'bob' would look something like $ref->{'b'}{'o'}{'b'}{'00'} (the 00 being an end marker). Only nodes which would represent words in the trie exist, making the structure slightly smaller than a hash of the same data set.

The advantages of the trie over other data storage methods is that lookup times are O(1) WRT the size of the index. For sparse data sets, it is probably not as efficient as performing a binary search on a sorted list, and for small files, it has a lot of overhead. The main advantage (at least from my perspective) is that it provides a relatively cheap method for finding a list of words in a large, dense data set which begin with a certain string.

In the other systems

SystemPortVersion
FreeBSDdevel/p5-Tree-Trie1.9
DragonFlydevel/p5-Tree-Trie1.9
HardenedBSDdevel/p5-Tree-Trie1.9
GhostBSDdevel/p5-Tree-Trie1.9

Install

Binary package:

pkg install p5-Tree-Trie

From the ports tree:

cd /usr/ports/devel/p5-Tree-Trie/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-Tree-Trie>0:devel/p5-Tree-Trie

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest1.91.91.91.91.9
FreeBSD:14:quarterly1.91.9n/a1.91.9
FreeBSD:15:latest1.91.9n/a1.91.9
FreeBSD:15:quarterly1.91.9n/an/an/a
FreeBSD:16:latest1.91.9n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

The Makefile names none itself; they come from USES and USE_*.

The full lists below include those, and their dependencies in turn.

Build dependencies 1
Run dependencies 1

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 2
  • %%SITE_PERL%%/Tree/Trie.pm
  • %%PERL5_MAN3%%/Tree::Trie.3.gz
distinfo 1
FileSizeSHA256
Tree-Trie-1.9.tar.gz41528cb05722f6d67a99a83f3af1427c5974da7a5509e1416f257aefbc93f3c9682bd
Master sites 1
  • CPAN

Commit history 0

No commits in the history this site was built from.