Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RianKoja/lottery_numbers
/ functions
Functions
30 in github.com/RianKoja/lottery_numbers
⨍
Functions
30
◇
Types & classes
2
↓ 4 callers
Method
add_number
Adds a number to the set. # Arguments `number` - The number to be added. # Returns `true` if the number was successfully added (not already present)
src/data_structures.rs:28
↓ 4 callers
Function
triplet2enum
Converts a triplet to its unique combinadic number. # Arguments `triplet` - A vector of 3 integers. # Returns The combinadic number representing the
src/custom_utils.rs:127
↓ 3 callers
Function
binomial
Computes the binomial coefficient C(n, k), which represents the number of ways to choose k elements from a set of n elements. # Arguments `n` - Total
src/custom_utils.rs:13
↓ 3 callers
Function
game2enum
Converts a lottery game (set of numbers) to its unique combinadic number. # Arguments `game` - A vector of integers representing the game numbers. #
src/custom_utils.rs:93
↓ 3 callers
Function
game2triplets
Generates all unique triplets from a game (set of 6 numbers). # Arguments `game` - A vector of exactly 6 integers. # Returns A vector of vectors, ea
src/custom_utils.rs:104
↓ 3 callers
Method
save_to_file
Saves the `NumberSet` to a file in JSON format. # Arguments `filename` - The path to the file where the data should be saved. # Returns `Ok(())` on
src/data_structures.rs:40
↓ 2 callers
Method
check_and_insert_all
Attempts to insert all numbers in a vector into the set. # Arguments `numbers` - A vector of numbers to be added. # Returns `true` if all numbers we
src/data_structures.rs:68
↓ 2 callers
Function
combinadic
Converts a combination (vector of integers) to its combinadic number representation. # Arguments `combination` - A vector of integers representing th
src/custom_utils.rs:37
↓ 2 callers
Function
create_invalidate_game
Creates a game validation closure based on the given configuration values. # Arguments `min_desired_number` - The minimum number allowed in a valid g
src/custom_utils.rs:140
↓ 2 callers
Function
inverse_combinadic
Converts a combinadic number to its corresponding combination. # Arguments `combination_no` - The combinadic number. `n` - Total number of elements i
src/custom_utils.rs:54
↓ 1 callers
Function
create_combinadic_rng
Creates a random number generator function for generating combinadic numbers. The range of random numbers is determined dynamically based on `n` and `
src/custom_utils.rs:179
↓ 1 callers
Function
enum2game
Converts a combinadic number to its corresponding lottery game. # Arguments `game_no` - The combinadic number representing the game. # Returns A vec
src/custom_utils.rs:78
↓ 1 callers
Function
max_combinadic
Computes the maximum combinadic number based on the total numbers in the game (`n`) and the number of numbers per game (`k`). # Arguments `n` - The m
src/custom_utils.rs:159
Function
enum2triplet
Converts a combinadic number to its corresponding triplet. # Arguments `triplet_no` - The combinadic number representing the triplet. # Returns A ve
src/custom_utils.rs:203
Method
from_file
(path: &str)
src/config.rs:14
Method
load_from_file
(filename: &str)
src/data_structures.rs:54
Function
main
()
src/main.rs:7
Method
new
Creates a new, empty `NumberSet`.
src/data_structures.rs:14
Function
test_add_number
()
src/data_structures.rs:92
Function
test_binomial
()
src/custom_utils.rs:212
Function
test_check_and_insert_all
()
src/data_structures.rs:122
Function
test_combinadic
()
src/custom_utils.rs:221
Function
test_config_can_parse_all_fields
()
src/config.rs:26
Function
test_create_invalidate_game
()
src/custom_utils.rs:272
Function
test_game2enum_and_enum2game
()
src/custom_utils.rs:237
Function
test_game2triplets
()
src/custom_utils.rs:250
Function
test_inverse_combinadic
()
src/custom_utils.rs:227
Function
test_new
()
src/data_structures.rs:86
Function
test_save_and_load_from_file
()
src/data_structures.rs:99
Function
test_triplet2enum_and_enum2triplet
()
src/custom_utils.rs:259