{"id":19664987,"url":"https://github.com/jonghough/subspace","last_synced_at":"2025-02-27T03:43:37.042Z","repository":{"id":150486501,"uuid":"60152105","full_name":"jonghough/Subspace","owner":"jonghough","description":"Math library, written in Java.","archived":false,"fork":false,"pushed_at":"2017-07-26T07:37:22.000Z","size":708,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-10T02:25:44.669Z","etag":null,"topics":["biginteger","combinatorics","elliptic-curves","factorization","fft","math","mathematics","maths","numbers","numerical-calculations","permutation","permutations","pollard","totient"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonghough.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":"2016-06-01T06:42:17.000Z","updated_at":"2021-01-18T04:41:06.000Z","dependencies_parsed_at":"2023-07-28T21:01:06.037Z","dependency_job_id":null,"html_url":"https://github.com/jonghough/Subspace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonghough%2FSubspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonghough%2FSubspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonghough%2FSubspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonghough%2FSubspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonghough","download_url":"https://codeload.github.com/jonghough/Subspace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240974497,"owners_count":19887306,"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":["biginteger","combinatorics","elliptic-curves","factorization","fft","math","mathematics","maths","numbers","numerical-calculations","permutation","permutations","pollard","totient"],"created_at":"2024-11-11T16:19:58.764Z","updated_at":"2025-02-27T03:43:37.023Z","avatar_url":"https://github.com/jonghough.png","language":"Java","readme":"[![Build Status](https://travis-ci.org/jonghough/Subspace.svg?branch=master)](https://travis-ci.org/jonghough/Subspace)\n# Subspace\n\n## Math library, written in Java, focusing on number theory and related fields.\n\n### Implemented functions:\n\n| Functions                                 | Implemented                                                                                                                 |\n|-------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|\n| Factorization                             | Rho, P-1, P+1, Elliptic Curve examples                                                                                      |\n| Arithmetic and Number theoretic functions | Prime decomposition, totient function, sigma functions, primality test, Meissel formula for  counting primes, Jacobi Symbol |\n| Analytic NT functions                     | Gamma function, approximation for large values, Riemann-Siegel formula for Z(t)                                             |\n| Sieves                                    | Eratosthenes, Atkin sieves                                                                                                  |\n| Combinatorics                             | Integer Partitions, Partition counting, Permutation, lexicographically ordered permutations, permutation rank, parity.      |\n\n## License\nBSD 2-clause “Simplified” License\n\n### To build the library\n\n`mvn clean install`\n\n### To run unit tests\n\n`mvn test`\n\n### Examples \n\n**\u003ci\u003eFactoring a BigInteger\u003c/i\u003e**\nThe following uses the Pollard-rho method of factorization:\n\n`ArrayList\u003cBigInteger\u003e list = Factorizor.factor(new BigInteger(\"909077759200010102032010201\"), Factorizor.FactorMethod.RHO);`\n\nwill return\n\n`967, 9819889267, 95734388625509`\n\nPollard P-1 method is also implemented:\n\n`ArrayList\u003cBigInteger\u003e list2 = Factorizor.factor(new BigInteger(\"425624900000909000001111317911\"), Factorizor.FactorMethod.PMO);`\n\nreturns \n\n `571, 62818373, 11865997022428766417`\n \n Factorizor also includes a P+1 factorization algorithm implementation.\n \n \n**\u003ci\u003eEuler Totient of a BigInteger\u003c/i\u003e**\n \n Euler totient is defined [Totient](https://en.wikipedia.org/wiki/Euler%27s_totient_function)\n \n `BigInteger tot = Totient.totient(new BigInteger(\"425624\"));`\n \n returns\n \n `209920`\n \n **\u003ci\u003e Calculating number of primes less than a given float (or BigDecimal)\u003c/i\u003e**\n \n `int q = PrimeCount.pi(1000000f);`\n \n returns\n \n `78498`\n \n This uses the Meissel formula to calculate pi(x). It will probably choke on values much larger than 10 million though.\n\n**Calculate Lexicographically ordered permutations of list of objects (which implement `Comparable`)**\n\n`ArrayList\u003cCharacter[]\u003e permutations = PermutationsGeneric.getLexicographicPermutations(new Character[]{'a', 'b', 'c'});`\n\t\t\n\t\t\nThis returns six permutations:\n\t\t\n\t\t```\n\t\t{'a','b','c'}\n\t\t{'a','c','b'}\n\t\t{'b','a','c'}\n\t\t{'b','c','a'}\n\t\t{'c','a','b'}\n\t\t{'c','b','a'}\n\t\t```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonghough%2Fsubspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonghough%2Fsubspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonghough%2Fsubspace/lists"}