94 Commits
Author SHA1 Message Date
nortega 084aa14026 Simplify README.md 2025-12-10 15:06:27 +01:00
nortega 966574dd1f Change default sieve size to 10485760.
I don't know why yet, but this seems to be the near optimal sieve size
when testing with the benchmarking script. It's equal to `1024^2 * 10`.
2025-12-10 14:59:52 +01:00
nortega 41bc18a17c Change test to 1,000,000,000 primes. 2025-12-10 14:59:33 +01:00
nortega 5dde94ae8c Add custom sieve and trials arguments to benchmark script. 2025-12-10 14:45:59 +01:00
nortega be3fd52cfa Improve help information. 2025-12-10 14:21:50 +01:00
nortega 0b391ed590 Allow for providing a custom sieve size. 2025-12-10 13:59:53 +01:00
nortega f5b971e35f Add comments to test.sh for better navigation. 2025-12-10 13:52:46 +01:00
nortega abfb1aee89 Fix test 1. 2025-12-10 13:52:12 +01:00
nortega 4b3bf0cfac Fix importing primes. 2025-12-10 13:29:02 +01:00
nortega ba3478e6ce Optimize marking of known composites. 2025-12-10 13:12:49 +01:00
nortega 5ee76502fa Switch to (segmented) sieve of Eratosthenes. 2025-12-10 11:46:22 +01:00
nortega 72d6f4e042 Ignore callgrind files. 2025-12-07 22:50:30 +01:00
nortega d4dc54fe59 Move prime finding to its own module. 2025-12-07 22:38:53 +01:00
nortega c7f4f3c2c4 Remove more unnecessary casts. 2025-12-07 22:05:49 +01:00
nortega 6c789195e6 Add benchmark dependency check. 2025-12-06 17:47:42 +01:00
nortega 98cb2f58ea Implement average of multiple trials. 2025-12-05 16:19:44 +01:00
nortega 073276da10 Add benchmarking script. 2025-12-05 15:50:38 +01:00
nortega 56a094730c Remove unnecessary cast. 2025-12-05 15:50:25 +01:00
nortega 3a4a5c8849 Change help information for num option. 2025-12-05 15:47:31 +01:00
nortega c0f3f730ae Optimize algorithm. 2025-12-05 15:41:26 +01:00
nortega 97d756bab4 Fix subtraction overflow. 2025-12-05 14:29:06 +01:00
nortega 91c9eaf1b9 Set fixed segment (array) size. 2025-12-05 14:27:22 +01:00
nortega 92bb314b55 Implement test functionality. 2025-12-05 13:55:06 +01:00
nortega 05e18e5aef Implement sieve of Atkin. 2025-12-05 13:16:37 +01:00
nortega 65314d52ac Simplify to normal VecDeque. 2025-12-05 11:29:55 +01:00
nortega 00da4333bf Fix readme filename in Cargo.toml 2025-12-04 11:59:06 +01:00
nortega bde097302b Point legacy link to code.ortegas.org. 2025-12-04 11:56:50 +01:00
nortega ed209116c4 Delete unnecessary comment. 2025-12-04 11:52:36 +01:00
nortega 63260b754e Use latest patch of structopt 0.3
Also updating dependencies in Cargo.lock
2025-12-04 11:51:45 +01:00
nortega e4844db5d6 Set default jobs value using structopt default_value. 2025-12-04 11:42:29 +01:00
nortega dfdadb9860 Rename primes_list -> prime_list.
Sounds better.
2025-12-04 11:26:10 +01:00
nortega 744efa105b Simplify CandidateGenerator::next() function. 2025-12-04 11:25:25 +01:00
nortega 22fe0953ca Use imported primes. 2025-12-04 11:24:40 +01:00
nortega e17ebf47c3 Simplify CandidateGenerator::new(). 2025-12-04 11:10:17 +01:00
nortega 9a7e303ed8 Implement prime testing. 2025-12-04 11:05:40 +01:00
nortega 6894d250dd Improve testing script. 2025-12-04 11:04:16 +01:00
nortega 23c8dd694f Use quotations to avoid word splitting. 2025-12-04 10:00:33 +01:00
nortega 04d76e53bd Fix setting default PREFIX in (un)install scripts. 2025-12-04 09:59:35 +01:00
nortega 449a4bd2a6 Simplify install script gzip command. 2025-12-04 09:50:20 +01:00
nortega 8a81df1006 Ignore compressed manpage. 2025-12-04 09:48:58 +01:00
nortega 8b92ab252b Remove unnecessary mut on primes_list.
I thought this would be necessary in order to add to the primes_list...
not sure why I'm wrong.
2025-12-04 09:46:45 +01:00
nortega 1bc1a02761 Implement basic single-threaded prime checking. 2025-12-04 09:46:06 +01:00
nortega 82d75227c4 Remove GitLab CI file. 2025-12-04 09:38:59 +01:00
nortega 0797c7419d Impelment CandidateGenerator. 2025-12-04 09:38:08 +01:00
nortega 2965336290 Update copyright heading. 2025-12-04 08:59:49 +01:00
nortega 1b6ad7c797 Implement test and gen for already-imported values. 2025-12-04 08:58:57 +01:00
nortega f88c221a67 Rename priems to primes_list. 2025-12-04 08:56:32 +01:00
nortega fed8fe9ba8 Remove TODO list.
I'm rewriting most of it anyways.
2025-12-03 21:41:38 +01:00
nortega ceb7e5974e Restructure code.
I'm gonna rewrite this whole thing.
2025-12-03 21:39:22 +01:00
nortega 80f9cc855d Forgot to add one to pp in parallel implementation. 2022-03-09 17:30:51 +01:00
nortega f45932e188 Change compound to composite
In English we say "composite" for numbers which are composed as opposed
to prime.
2022-03-09 17:15:29 +01:00
nortega 374bc02b50 Use functional paradigm for file reading. 2022-03-09 16:59:30 +01:00
nortega df7017518e Use markdown for README. 2022-03-04 17:06:39 +01:00
nortega a2dfd6a6ca Quick fix partition point. 2022-03-04 16:57:29 +01:00
nortega 5c8c7baa75 Parallelize prime testing. 2022-03-04 15:48:00 +01:00
nortega b682ad9e9b Add rayon for parallelization. 2022-03-04 15:22:48 +01:00
nortega caad128ad2 Switch to using u64 for n rather than usize 2022-03-04 15:20:58 +01:00
nortega 7c2a5e7250 Use consistent formatting. 2022-03-03 16:46:31 +01:00
nortega d2f59a6b21 Use functional programming. 2022-03-03 16:30:40 +01:00
nortega c9db711008 Add license scanning again.
Apparently it does work?
2022-03-01 18:59:38 +01:00
nortega 752eca18ef Remove license scanning.
It's an Ultimate-only feature which I do not have.
2022-03-01 18:50:48 +01:00
nortega 39f88a3fd5 Test out license scanning. 2022-03-01 18:49:40 +01:00
nortega e515f72228 Add test stage to CI. 2022-03-01 18:42:10 +01:00
nortega c9293d4132 Add .gitlab-ci.yml 2022-03-01 17:50:49 +01:00
nortega 72d33325d0 Added 'test' option to man page. 2021-05-19 17:15:57 +02:00
nortega 1b9e7acfa9 Merge branch 'develop' of gitlab.com:naortega/indivisible into develop 2021-05-10 18:46:56 +02:00
nortega b13a363119 Will probably use normal threading. 2021-05-10 18:46:05 +02:00
nortega 9d84ce14b2 Added comments documenting code conditionals. 2021-05-07 17:36:38 +02:00
nortega 9b60985f8c Removed item from TODO list. 2021-05-05 18:19:35 +02:00
nortega 202c289d47 Refractored code to handle import files better. 2021-05-05 18:17:37 +02:00
nortega 64bba9564c I don't use FLAGS. Just OPTIONS in manpage. 2021-03-04 12:56:33 +01:00
nortega 76275660e3 Removed unnecessary variables. 2021-03-04 12:50:25 +01:00
nortega 0e59a7154d Added (un)installation instructions. 2021-03-03 18:58:07 +01:00
nortega bd3e48256f Install and uninstall scripts. 2021-03-03 18:54:12 +01:00
nortega 942737cd4a Changed descriptions. 2021-03-03 13:33:04 +01:00
nortega c68d75cb8c Add help information to --help option. 2021-03-03 13:24:53 +01:00
nortega 3eaaa296ee Changed to uppercase for FILE parameter. 2021-03-03 13:24:02 +01:00
nortega 196f7b9ca9 Change name of argument for -i option. 2021-03-03 12:57:46 +01:00
nortega 585bdee553 Removed documentation items from TODO. 2021-03-03 12:45:49 +01:00
nortega 915593a24a Created man page. 2021-03-03 12:45:11 +01:00
nortega 92a62ca346 Add new feature TODO. 2021-03-03 11:58:36 +01:00
nortega 3d52d6eb9f Added basic documentation to README. 2021-03-03 11:57:19 +01:00
nortega 6f3324e624 Add feature for imports. 2021-03-03 11:41:52 +01:00
nortega da9ef4211e Removed interface TODO items. 2021-03-03 11:41:08 +01:00
nortega c10c79dcfd Removed unnecessary comments for old argument parsing. 2021-03-03 11:18:52 +01:00
nortega 4e83d73810 Changed options structure and added verbose option. 2021-03-02 18:09:24 +01:00
nortega efe9ec5b3b Added new dependency. 2021-03-02 17:22:31 +01:00
nortega 683a222b76 Modified items in TODO for interface. 2021-03-02 17:14:54 +01:00
nortega 343a89e89f Switch to tabs (not spaces).
Stupid default options for NeoVim think it's a good idea to switch my
indentation type without asking me.
2021-03-01 19:40:02 +01:00
nortega 3f089ad0a4 Better iteration over elements. 2021-03-01 19:21:35 +01:00
nortega 07c6806b6d Added a TODO list. 2021-03-01 19:00:13 +01:00
nortega 7a755f7b05 Fixed bug. 2021-03-01 18:51:53 +01:00
nortega a3c8bfa5f2 Cargo lock had to update. 2021-03-01 18:41:56 +01:00
nortega 3c9efbb484 Updated the Cargo.toml file. 2021-03-01 18:40:33 +01:00