23 Commits

Author SHA1 Message Date
cb9bbbb77d Add new problem module prob757 and update mod.rs to include it
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 49s
Rust-lint / Run rust tests (push) Failing after 1m7s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 43s
- Introduced the `prob757` module, which is now part of the Project Euler series.
- Updated the `mod.rs` file to include the new `prob757` module, ensuring it is accessible within the project.
2025-10-08 01:35:48 +09:00
d1389a2efe Refactor problem modules and enhance utility functions for Project Euler
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 21s
Rust-lint / Run rust tests (push) Failing after 1m14s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 47s
- Updated the `prob684` module to change function signatures from `usize` and `i64` to `u64`, improving type consistency and performance.
- Introduced the `prob872` module, implementing a tree structure with methods for node management and sum calculations, along with comprehensive unit tests.
- Added the `prob944` module, featuring multiple functions for calculating sums with modular arithmetic, including progress indication for long-running tasks.
- Introduced a new `quotient_iter` utility for efficient quotient iteration, enhancing modular arithmetic operations.
- Updated the `mod.rs` file to include the new modules and utility functions.
2025-09-22 19:21:36 +09:00
4075d2ef69 Add new problem modules prob800 and prob853, and update dependencies
- Introduced the `prob800` module, implementing a function to count hybrid integers with corresponding unit tests.
- Added the `prob853` module, which includes functions for calculating Pisano periods and their factors, along with extensive unit tests.
- Updated `mod.rs` to include the new problem modules.
- Added the `indicatif` dependency to `Cargo.toml` for progress indication in long-running tasks.
- Enhanced the `factor` utility with a new function to derive divisors from prime factorization.
2025-09-21 00:05:04 +09:00
81ca2f078d Refactor sum_of_si function and add sum_of_fibonacci_si for modular calculations
- Updated the `sum_of_si` function to accept `i64` parameters for `limit` and `modulo`, enhancing its flexibility.
- Introduced a new function `sum_of_fibonacci_si` to compute the sum of `sum_of_si` values for Fibonacci numbers, with modular arithmetic support.
- Updated unit tests to reflect the changes in function signatures and validate the new functionality.
2025-09-17 22:06:53 +09:00
4e63ac18c3 Add new problem modules prob686 and prob751 for Project Euler
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 23s
Rust-lint / Run rust tests (push) Failing after 56s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 40s
- Introduced the `prob686` module, implementing functions to find powers of two with specific leading digits and included unit tests for validation.
- Added the `prob751` module, which includes functions for generating sequences and calculating tau values, along with corresponding unit tests.
- Updated the `mod.rs` file to include the new problem modules.
2025-09-17 17:57:01 +09:00
9f4cae90d7 Add new problem module prob938 for Project Euler
- Introduced the `prob938` module, implementing functions to calculate the probability of a black win in a game scenario.
- Added both recursive and bottom-up approaches for probability calculation.
- Included unit tests to validate the correctness of the implemented functions.
- Updated the `mod.rs` file to include the new `prob938` module.
2025-09-16 22:53:59 +09:00
55bacc5728 Add new problem modules and utility functions for Project Euler
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 23s
Rust-lint / Run rust tests (push) Failing after 1m2s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 38s
- Introduced `prob107`, `prob684`, `prob845`, `prob869`, `prob926`, and `prob932` modules for new problem implementations in the Project Euler series.
- Added utility functions for graph processing, number factorization, and digit sum calculations.
- Implemented unit tests for the new functionalities to ensure correctness and reliability.
- Updated the `mod.rs` files to include the new problem modules and utility functions.
- Refactored existing code for improved clarity and performance.
2025-09-14 23:14:38 +09:00
fb135b6ec2 Add new problem modules and utility functions for combinatorics
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 20s
Rust-lint / Run rust tests (push) Failing after 56s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 33s
- Introduced `prob527` module for a new problem implementation in the Project Euler series.
- Enhanced the `combinatoric` module with a new `CombinationTree` struct for efficient combination calculations.
- Added utility functions for calculating expected values in binary and random search scenarios.
- Implemented unit tests for the new functionalities to ensure correctness and reliability.
- Updated the `mod.rs` files to include the new problem module and utility functions.
2025-05-27 23:48:36 +09:00
b25ed7e13d Add new problem modules and utility functions for Euler and Rosalind challenges
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 19s
Rust-lint / Run rust tests (push) Failing after 55s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 36s
- Introduced `prob700`, `prob808`, and `prob816` modules for new problem implementations in the Project Euler series.
- Added utility functions for calculating Euler coins and their sums, as well as methods for finding reversible primes and calculating shortest distances in a modular context.
- Updated the `mod.rs` files to include the new problem modules in both the Project Euler and Rosalind sections.
- Enhanced the `integer` and `modulo` utility modules with new functions for coprimality checks and modular multiplication.
- Included unit tests for the new functionalities to ensure correctness and reliability.
- Refactored existing tests for consistency in the `finding_protein_motif` module.
2025-05-23 11:12:37 +09:00
f4d4c81d31 Add 2025 number checking functions and utility methods
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 17s
Rust-lint / Run rust tests (push) Failing after 50s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 31s
- Introduced `naive_check_2025_number` to validate if a number can be expressed as a sum of two squares.
- Added `total_sum_2025_numbers` to compute the total of all 2025 numbers up to a given limit.
- Implemented utility functions `has_split_of_sum` and `has_single_split_of_sum` for number splitting logic.
- Included unit tests for the new functions to ensure correctness.
- Updated the `integer` utility module to support the new functionalities.
2025-05-19 00:25:51 +09:00
9684cd8859 Add composition functions to combinatoric module
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 20s
Rust-lint / Run rust tests (push) Failing after 52s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 32s
- Introduced new functions for generating compositions, including `composition_of_length`, `composition`, `permuted_composition`, and their variants with minimum and maximum constraints.
- Added depth-first search (DFS) logic for generating compositions and permutations.
- Included unit tests to verify the correctness of the new composition functionalities.
- Updated the combinatoric module to reflect these additions.
2025-05-17 17:36:48 +09:00
27dc9fa1e3 Add enumerating gene orders functionality
- Introduced a new module `enumerating_gene_orders` to generate and format permutations of gene orders.
- Implemented functions to create permutations and return them as a formatted string.
- Added unit tests to verify the correctness of permutation generation and string formatting.
- Updated the main module to include the new `enumerating_gene_orders` module.
2025-05-17 15:45:16 +09:00
ef3f560252 Add new combinatoric utilities and RNA splicing functionality
- Introduced a new `combinatoric` module with functions for calculating factorials and combinations, including combinations with repetition.
- Added a new `rna_splicing` module to handle RNA splicing operations, including a function to splice DNA sequences and translate the resulting RNA.
- Included unit tests for both the combinatoric and RNA splicing functionalities to ensure correctness.
- Updated the respective module files to include the new modules.
2025-05-16 17:41:03 +09:00
8a99c29fd1 Add DNA and RNA utilities for biological computations
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 17s
Rust-lint / Run rust tests (push) Failing after 55s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 44s
- Introduced a new `dna` module for DNA representation and functionality, including conversion from RNA and complement methods.
- Updated the `rna` module to include complement and reverse complement methods, along with a new `RNACodon` struct for RNA codon representation.
- Refactored translation functionality to utilize `RNACodon` instead of the previous `Codon` struct.
- Added unit tests for new functionalities in both `dna` and `rna` modules to ensure correctness.
- Updated the biology module to include the new `dna` module.
2025-05-15 08:47:44 +09:00
02fc9d5915 Add protein motif finding functionality and update dependencies
- Introduced a new module `finding_protein_motif` for locating motifs in protein sequences, including functions to handle UniProt IDs.
- Added a new `motif` module to support motif parsing and matching using regex.
- Updated the `AminoAcid` struct to include a method for validating amino acid strings.
- Added new dependencies: `encoding`, `flate2`, `regex`, and `ureq` for handling data retrieval and processing.
- Included unit tests for the new functionalities to ensure correctness.
2025-05-14 22:01:46 +09:00
0d4b8dbff1 Remove src/main.rs file as it is now excluded from tracking in .gitignore. This file contained the main functionality for counting possible mRNA sequences from protein sequences, which has been refactored out in previous commits.
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 39s
Rust-lint / Run rust tests (push) Failing after 54s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 30s
2025-05-14 00:38:19 +09:00
088ff40a14 Update .gitignore to exclude src/main.rs file
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 15s
Rust-lint / Run rust tests (push) Failing after 41s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 30s
- Added src/main.rs to .gitignore to prevent tracking of changes in the main source file.
2025-05-14 00:36:11 +09:00
4e18ec84b0 Refactor main functionality to calculate protein mass
- Replaced the mRNA counting functionality with a new implementation for calculating protein mass based on amino acid sequences.
- Introduced a new module `calculate_protein_mass` with a function to compute the mass of a protein string.
- Updated the `AminoAcid` struct to include a method for retrieving the mass of each amino acid.
- Added unit tests to ensure the correctness of the protein mass calculation.
2025-05-14 00:34:39 +09:00
32aa6e67db Rename project to code_problems and add biology utilities
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 18s
Rust-lint / Run rust tests (push) Failing after 41s
Rust-lint / Check Rust code with rustfmt and clippy (push) Failing after 30s
- Updated `Cargo.toml` to reflect the new project name and added `clap` dependency.
- Introduced new modules for biological computations, including amino acid and RNA representations.
- Implemented functions for counting possible mRNA sequences from protein sequences.
- Added unit tests for new functionalities to ensure correctness.
2025-05-14 00:14:47 +09:00
52df23b962 Refactor project structure and add new problem modules
- Introduced new modules for various coding challenges: `acmicpc`, `codeforces`, `codewars`, `leetcode`, `project_euler`, and `rosalind`.
- Updated `src/lib.rs` to include the new modules.
- Modified `src/main.rs` to utilize the `rosalind` module for inferring mRNA from protein sequences.
- Added implementations for several problems in the `project_euler` module, including diophantine solutions and figurate numbers.
- Created unit tests for new functionalities to ensure correctness.
2025-05-14 00:12:00 +09:00
c97a6338b5 Add Markov chain utilities and update dependencies
- Introduced `MarkovState` and `WayCounter` structs for Markov chain simulations in `src/utils/markov.rs`.
- Added validation checks for input parameters in both structs.
- Implemented step functions to update state based on transition matrices.
- Included unit tests for functionality and validation checks.
- Updated `Cargo.toml` to include `approx` and `ndarray` dependencies.
2025-05-11 16:37:03 +09:00
e72c8c95e4 Initial project setup with Cargo.toml, source files, and utility modules. Added .gitignore to exclude target files and Cargo.lock. Implemented various problem modules and utility functions for mathematical operations.
Some checks failed
mint_ci / Check Python code using ruff (push) Successful in 1m23s
Rust-lint / Run rust tests (push) Failing after 51s
Rust-lint / Check Rust code with rustfmt and clippy (push) Successful in 21s
2025-05-09 10:56:10 +09:00
767e35818d Initial commit 2025-04-22 22:39:50 +09:00