{"id":18832308,"url":"https://github.com/brianmacintosh/discretedistribution","last_synced_at":"2025-06-26T10:32:33.960Z","repository":{"id":72114358,"uuid":"345496207","full_name":"BrianMacIntosh/DiscreteDistribution","owner":"BrianMacIntosh","description":"Single-file C# discrete distribution class.","archived":false,"fork":false,"pushed_at":"2021-03-10T19:39:59.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-29T16:51:14.449Z","etag":null,"topics":["csharp","csharp-library","discrete-distributions","math","mathematics"],"latest_commit_sha":null,"homepage":"","language":"C#","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/BrianMacIntosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-03-08T01:27:54.000Z","updated_at":"2023-10-07T00:23:25.000Z","dependencies_parsed_at":"2023-02-23T04:15:56.431Z","dependency_job_id":null,"html_url":"https://github.com/BrianMacIntosh/DiscreteDistribution","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BrianMacIntosh/DiscreteDistribution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianMacIntosh%2FDiscreteDistribution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianMacIntosh%2FDiscreteDistribution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianMacIntosh%2FDiscreteDistribution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianMacIntosh%2FDiscreteDistribution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianMacIntosh","download_url":"https://codeload.github.com/BrianMacIntosh/DiscreteDistribution/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianMacIntosh%2FDiscreteDistribution/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262048013,"owners_count":23250472,"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":["csharp","csharp-library","discrete-distributions","math","mathematics"],"created_at":"2024-11-08T01:57:29.968Z","updated_at":"2025-06-26T10:32:33.955Z","avatar_url":"https://github.com/BrianMacIntosh.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DiscreteDistribution\nA single-file C# discrete distribution class. This class allows you to aggregate samples into integer buckets and perform analysis on the set of samples.\n\n# API\n\n## Constructors\n\n### DiscreteDistribution(List\u003cint\u003e samples)\nConstructs a distribution from a set of samples.\n\n### DiscreteDistribution(int min, int max)\nConstructs an empty distribution with preallocated space.\n\nThe class also supports collection initialization.\n\n## Other Important Members\n\n### int Min\nThe value of the smallest sample in the distribution.\n\n### int Max\nThe value of the largest sample in the distribution.\n\n### this[int key]\nGets or sets the number of samples in the specified bucket.\n\n### Add(DiscreteDistribution other)\nAdds all the samples in the `other` distribution to this one.\n\n### Add(int sample)\nAdds a sample to the distribution.\n\n### Add(int sample, int quantity)\nAdds a quantity of the same sample to the distribution.\n\n### Remove(int sample)\nRemoves a sample from the distribution.\n\n### double GetMean()\nCalculates the mean of the distribution.\n\n### double GetStandardDeviation()\nCalculates the standard deviation of the distribution.\n\n### int GetSampleCount()\nReturns the total number of samples in the distribution.\n\n### string GetHorizontalBarGraph(int maxWidth, string keyFormat)\nProduces an ASCII bar graph of the distribution.\n* `maxWidth`: The maximum width of the bars. 0 uses the raw value.\n* `keyFormat`: Format specifier to use to format the key values.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianmacintosh%2Fdiscretedistribution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianmacintosh%2Fdiscretedistribution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianmacintosh%2Fdiscretedistribution/lists"}