{"id":20041123,"url":"https://github.com/makiuchi-d/tinymt-csharp","last_synced_at":"2026-06-04T22:31:37.463Z","repository":{"id":147357330,"uuid":"344810612","full_name":"makiuchi-d/TinyMT-CSharp","owner":"makiuchi-d","description":"C# implementation of TinyMT","archived":false,"fork":false,"pushed_at":"2021-03-06T08:20:29.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-02T06:48:13.865Z","etag":null,"topics":["csharp","tinymt"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/makiuchi-d.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}},"created_at":"2021-03-05T12:54:16.000Z","updated_at":"2021-03-06T08:21:56.000Z","dependencies_parsed_at":"2023-08-25T12:02:39.353Z","dependency_job_id":null,"html_url":"https://github.com/makiuchi-d/TinyMT-CSharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/makiuchi-d/TinyMT-CSharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiuchi-d%2FTinyMT-CSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiuchi-d%2FTinyMT-CSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiuchi-d%2FTinyMT-CSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiuchi-d%2FTinyMT-CSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makiuchi-d","download_url":"https://codeload.github.com/makiuchi-d/TinyMT-CSharp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiuchi-d%2FTinyMT-CSharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33923173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","tinymt"],"created_at":"2024-11-13T10:45:29.303Z","updated_at":"2026-06-04T22:31:37.446Z","avatar_url":"https://github.com/makiuchi-d.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TinyMT-CSharp\nC# implementation of [TinyMT](https://github.com/MersenneTwister-Lab/TinyMT).\n\nThe class `TinyMT.Random` is compatible with the `System.Random`.\nSo, it can be easily replaced.\n\n## Reference\n\n### Class TinyMT.Random\nTiny Mersenne Twister pseudo-random number generator.\n\n#### Constructors\n\n##### Random()\nInitializes a new instance with default seed and parameters.\n\n##### Random(int seed)\nInitializes an instance with the specified seed and default parmeters.\n###### Parameters\n - `seed`: The seed value of pseudo-random number sequence. If a negative value is specified, the absolute value is used.\n\n##### Random(ulong seed)\nInitializes a new instance with the specified seed and default parameters.\n###### Parameters\n- `seed`: The seed value of pseudo-random number sequence.\n\n##### Random(ulong seed, uint mat1, uint mat2, ulong tmat)\nInitializes a new instance with the specified seed and parameters.\n###### Parameters\n- `seed`: The seed value of pseudo-random number sequence.\n- `mat1`: State transition parameter.\n- `mat2`: State transition parameter.\n- `tmat`: Tempering parameter.\n\n##### Random(ulong[] initKey)\nInitializes a new instance with an array of integers used as seeds, and default parameters.\n###### Parameters\n- `initKey`: The array of 64-bit integers, used as seed.\n\n##### Random(ulong[] initKey, uint mat1, uint mat2, ulong tmat)\nInitializes a new instance with an array of integers used as seeds, and parameters.\n###### Parameters\n- `initKey`: The array of 64-bit integers, used as seed.\n- `mat1`: State transition parameter.\n- `mat2`: State transition parameter.\n- `tmat`: Tempering parameter.\n\n#### Methods\n\n##### int Next()\nReturns a non-negative random integer.\n###### Returns\nA random integer (0 \u0026le; ret \u0026le; `int.MaxValue`).\n\n##### int Next(int maxValue)\nReturns a non-negative random integer that is less than the specified maximum.\n###### Parameters\n- `maxValue`: The exclusive upper bound of the generated random value. this must be greater than or equal to 0.\n###### Returns\nA random integer (0 \u0026le; ret \u0026lt; `maxValue`).\n###### Exceptions\n- `ArgumentOutOfRangeException`: `maxValue` is less than 0.\n\n\n##### int Next(int minValue, int maxValue)\nReturns a random integer that is within a specified range.\n###### Parameters\n- `minValue`: The inclusive lower bound of the generated random value.\n- `maxValue`: The exclusive upper bound of the generated random value. this must be greater than or equal to `minValue`\n###### Returns\nA random integer (`minValue` \u0026le; ret \u0026lt; `maxValue`).\n###### Exceptions\n`ArgumentOutOfRangeException`: `minValue` is greater than `maxValue`.\n\n##### ulong NextUInt64()\nReturns a random 64bit unsigned integer.\n###### Returns\nA random integer (0 \u0026le; ret \u0026lt; 2^64).\n\n##### void NextBytes(byte[] buffer)\nFills the elements of a specified array of bytes with random numbers.\nEach element of the array is set to a random value (0 \u0026le; value \u0026le; `byte.MaxValue`).\n###### Parameters\n- `buffer`: The array to be filled with random numbers.\n###### Exceptions\n- `ArgumentNullException`: `buffer` is null.\n\n##### void NextBytes(Span\u003cbyte\u003e buffer)\nFills the elements of a specified array of bytes with random numbers.\nEach element of the array is set to a random value (0 \u0026le; value \u0026le; byte.MaxValue).\n###### Parameters\n- `buffer`: The array to be filled with random numbers.\n\n##### double NextDouble()\nReturns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.\n###### Returns\nA double-precision floating point number (0.0 \u0026le; ret \u0026lt; 1.0).\n\n##### double NextDouble01()\nReturns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.\n###### Returns\nA double-precision floating point number (0.0 \u0026le; ret \u0026lt; 1.0).\n\n##### double NextDouble12()\nReturns a random floating-point number that is greater than or equal to 1.0, and less than 2.0.\n###### Returns\nA double-precision floating point number (1.0 \u0026le; ret \u0026lt; 2.0).\n\n##### double NextDoubleOC()\nReturns a random floating-point number that is greater than 0.0, and less than or equal to 1.0.\n###### Returns\nA double-precision floating point number (0.0 \u0026lt; ret \u0026le; 1.0).\n\n##### double NextDoubleOO()\nReturns a random floating-point number that is greater than 0.0, and less than 1.0.\n###### Returns\nA double-precision floating point number (0.0 \u0026lt; ret \u0026lt; 1.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakiuchi-d%2Ftinymt-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakiuchi-d%2Ftinymt-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakiuchi-d%2Ftinymt-csharp/lists"}