PLGEN(1)
β¨ PLGEN β the power-law sample generator, bestie β¨
okay so this is a page from the User Commands part of the manual, section 1, and it's all about a little program called plgen. it's giving "I make random numbers and I make them fabulous". let's get into it π
πΈ NAME πΈ
plgen β generate samples from a power-law distribution π¦
π SYNOPSIS π
plgen [OPTIONS] num_samples gamma [kappa]
like... that's the whole vibe. you hand it a number, a gamma, and maybe a kappa, and it hands you back samples. iconic behavior fr fr.
π DESCRIPTION π
okay so real talk: plgen generates a given number of samples from a power-law distribution, with an optional exponential cutoff. that's it, that's the job, and it does it gorgeously.
the pdf that's being sampled is, and I quote verbatim because I would never change a single character of math:
P(k) = C * k^(-gamma) * exp(-k/kappa)
where C is an appropriate normalization constant (it's just doing its little normalization thing, no notes).
so where do the values come from? bestie, keep up:
gammais given by the second command line argument. yes, positional. yes, it matters.kappais given by the-kswitch. so if you want that exponential cutoff, that's your girl.
no cap, if you skip kappa you're just getting the plain power-law with no cutoff. that's not a bug, that's a choice, and it's yours to make π
β¨ OPTIONS β¨
one bullet per flag, because we are thorough and we are cute:
-hβ shows this help message. your little "what do I do" bestie. zero judgment π«Ά-vβ shows version information. gotta know what era ofplgenyou're living in β-cβ generate continuous samples. not discrete, not playing around. continuous π«-kKAPPA β use exponential cutoff with kappa = KAPPA. this is the one that puts the exp in your pdf π₯-oOFFSET β add OFFSET to each generated sample. every single one. shifting the whole squad over π-sSEED β use SEED to seed the random number generator. for when you need your randomness to be, um, reproducible. the chaos is deterministic, slay π-xXMIN β generate a power-law distribution that starts at XMIN. sets the floor. nothing below this, periodt π
π¦ that's a wrap π¦
and that's the whole page, bestie!! this manual was brought to you by plfit, and it's dated July 2021 β so it's vintage at this point, honestly, and we respect our elders ππ go forth, generate samples, be the main character of your own distribution. mwah π
β¨
π¦ where this page comes from
- debian bookworm: plfit 0.9.4+ds-1+b1 Β· GPL-2.0-or-later
- debian trixie: plfit 0.9.6+ds-2+b1 Β· GPL-2.0-or-later
- ubuntu jammy: plfit 0.9.3+ds-1ubuntu1 Β· GPL-2.0-or-later
- ubuntu noble: plfit 0.9.4+ds-1ubuntu4 Β· GPL-2.0-or-later
- ubuntu questing: plfit 0.9.6+ds-2ubuntu1
- ubuntu resolute: plfit 0.9.6+ds-2ubuntu2 Β· GPL-2.0-or-later
- ubuntu stonking: plfit 0.9.6+ds-2ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms