SkillAgentSearch skills...

LibDDRV

Generate discrete random variates from a set of dynamically weighted elements in Solidity using a forest of trees data structure, based on a novel algorithm laid out in a paper found in the esoteric footnotes of Knuth. Runs in iterative log time for on-chain use cases.

Install / Use

/learn @valorem-labs-inc/LibDDRV
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

LibDDRV

Github Actions

Library for generating discrete random variates from a set of dynamically weighted elements in Solidity.

Based on this paper.

The algorithm preprocesses a list of weighted elements into a forest of trees data structure, and then traverses that forest to generate a random variate from the discrete distribution in sublinear time. Critically, the library supports inserting, updating, and deleting elements from the forest.

more to come

Getting Started

Contributing

Security

Related Skills

View on GitHub
GitHub Stars12
CategoryDevelopment
Updated11mo ago
Forks1

Languages

Solidity

Security Score

87/100

Audited on Apr 25, 2025

No findings