MCPcopy Create free account

hub / github.com/RianKoja/lottery_numbers / functions

Functions30 in github.com/RianKoja/lottery_numbers

↓ 4 callersMethodadd_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 callersFunctiontriplet2enum
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 callersFunctionbinomial
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 callersFunctiongame2enum
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 callersFunctiongame2triplets
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 callersMethodsave_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 callersMethodcheck_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 callersFunctioncombinadic
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 callersFunctioncreate_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 callersFunctioninverse_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 callersFunctioncreate_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 callersFunctionenum2game
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 callersFunctionmax_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
Functionenum2triplet
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
Methodfrom_file
(path: &str)
src/config.rs:14
Methodload_from_file
(filename: &str)
src/data_structures.rs:54
Functionmain
()
src/main.rs:7
Methodnew
Creates a new, empty `NumberSet`.
src/data_structures.rs:14
Functiontest_add_number
()
src/data_structures.rs:92
Functiontest_binomial
()
src/custom_utils.rs:212
Functiontest_check_and_insert_all
()
src/data_structures.rs:122
Functiontest_combinadic
()
src/custom_utils.rs:221
Functiontest_config_can_parse_all_fields
()
src/config.rs:26
Functiontest_create_invalidate_game
()
src/custom_utils.rs:272
Functiontest_game2enum_and_enum2game
()
src/custom_utils.rs:237
Functiontest_game2triplets
()
src/custom_utils.rs:250
Functiontest_inverse_combinadic
()
src/custom_utils.rs:227
Functiontest_new
()
src/data_structures.rs:86
Functiontest_save_and_load_from_file
()
src/data_structures.rs:99
Functiontest_triplet2enum_and_enum2triplet
()
src/custom_utils.rs:259