{"id":16313983,"url":"https://github.com/lysxia/boltzmann-samplers","last_synced_at":"2025-03-22T20:35:48.413Z","repository":{"id":62435659,"uuid":"83998874","full_name":"Lysxia/boltzmann-samplers","owner":"Lysxia","description":null,"archived":false,"fork":false,"pushed_at":"2018-05-31T15:04:43.000Z","size":67,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-26T00:25:12.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lysxia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-05T20:11:28.000Z","updated_at":"2023-10-05T15:39:31.000Z","dependencies_parsed_at":"2022-11-01T21:30:34.579Z","dependency_job_id":null,"html_url":"https://github.com/Lysxia/boltzmann-samplers","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lysxia%2Fboltzmann-samplers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lysxia%2Fboltzmann-samplers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lysxia%2Fboltzmann-samplers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lysxia%2Fboltzmann-samplers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lysxia","download_url":"https://codeload.github.com/Lysxia/boltzmann-samplers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221839369,"owners_count":16889609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T21:52:52.031Z","updated_at":"2024-10-28T14:19:48.751Z","avatar_url":"https://github.com/Lysxia.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Boltzmann samplers [![Hackage](https://img.shields.io/hackage/v/boltzmann-samplers.svg)](https://hackage.haskell.org/package/boltzmann-samplers) [![Build Status](https://travis-ci.org/Lysxia/boltzmann-samplers.svg)](https://travis-ci.org/Lysxia/boltzmann-samplers)\n==================\n\n`Boltzmann.Data`\n----------------\n\nDefine sized random generators for `Data.Data` generic types.\n\n```haskell\n    {-# LANGUAGE DeriveDataTypeable #-}\n\n    import Data.Data\n    import Test.QuickCheck\n    import Boltzmann.Data\n\n    data Term = Lambda Int Term | App Term Term | Var Int\n      deriving (Show, Data)\n\n    instance Arbitrary Term where\n      arbitrary = sized $ generatorPWith [positiveInts]\n\n    positiveInts :: Alias Gen\n    positiveInts =\n      alias $ \\() -\u003e fmap getPositive arbitrary :: Gen Int\n\n    main = sample (arbitrary :: Gen Term)\n```\n\n- Objects of the same size (number of constructors) occur with the same\n  probability (see Duchon et al., references below).\n- Implements rejection sampling and pointing.\n- Works with QuickCheck and MonadRandom, but also similar user-defined monads\n  for randomness (just implement `MonadRandomLike`).\n- Can be tweaked somewhat with user defined generators.\n\n`Boltzmann.Species`\n-------------------\n\nAn experimental interface to obtain Boltzmann samplers from an applicative\nspecification of a combinatorial system.\n\nNo documentation (yet).\n\nReferences\n----------\n\n- The core theory of Boltzmann samplers is described in\n  [Boltzmann Samplers for the Random Generation of Combinatorial Structures](http://algo.inria.fr/flajolet/Publications/DuFlLoSc04.pdf),\n  P. Duchon, P. Flajolet, G. Louchard, G. Schaeffer.\n\n- The numerical evaluation of recursively defined generating functions\n  is taken from\n  [Boltzmann Oracle for Combinatorial Systems](http://www.dmtcs.org/pdfpapers/dmAI0132.pdf),\n  C. Pivoteau, B. Salvy, M. Soria.\n\nSee also\n--------\n\n- [boltzmann-brain](https://hackage.haskell.org/package/boltzmann-brain-1.3.1.3),\n  Boltzmann sampler compiler for combinatorial systems.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flysxia%2Fboltzmann-samplers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flysxia%2Fboltzmann-samplers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flysxia%2Fboltzmann-samplers/lists"}