MCPcopy Create free account

hub / github.com/alexfertel/rust-algorithms / functions

Functions990 in github.com/alexfertel/rust-algorithms

↓ 1 callersFunctionrot_word
rot_word rotates the given word to the left. # Arguments `word` - The word to rotate # Returns The rotated word
src/ciphers/aes.rs:753
↓ 1 callersMethodsearch
(&self, s: &'a str)
src/string/aho_corasick.rs:64
↓ 1 callersFunctionselection_sort
(array: &mut [T])
src/sorting/selection_sort.rs:3
↓ 1 callersFunctionset_bit
Sets a specific bit in a number. Sets the bit at position `n` in `bits` to 1. see: [Set Bit](https://en.wikipedia.org/wiki/Bit_manipulation) # Argu
src/bit_manipulation/basic.rs:57
↓ 1 callersFunctionset_done
(vertex_state: &mut u64)
src/graphs/strongly_connected_components.rs:34
↓ 1 callersFunctionshell_sort
(values: &mut [T])
src/sorting/shell_sort.rs:3
↓ 1 callersFunctionshift_rows
shift_rows applies the AES ShiftRows/InvShiftRows operation to the given block. The block is modified in place. # Arguments `block` - The block to a
src/ciphers/aes.rs:627
↓ 1 callersMethodsink
(&mut self, mut k: usize, less: fn(T, T) -> bool)
src/data_structures/heap.rs:115
↓ 1 callersFunctionsolve_nq_util
Solves the nqueens problem (recursive) This function is part of the nqueens algorithms and inserts the queens at safe positions recursively. See [nq
src/general/nqueens.rs:88
↓ 1 callersFunctionsort_by_min_angle
(pts: &[(f64, f64)], min: &(f64, f64))
src/general/convex_hull.rs:3
↓ 1 callersFunctionstooge_sort
(arr: &mut [T])
src/sorting/stooge_sort.rs:19
↓ 1 callersFunctionstore_sorted
Function to perform inorder traversal and store in a vector
src/sorting/tree_sort.rs:45
↓ 1 callersMethodswim
(&mut self, mut k: usize, less: fn(T, T) -> bool)
src/data_structures/heap.rs:108
↓ 1 callersFunctiontake_min
Removes the smallest node from the tree, if one exists.
src/data_structures/avl_tree.rs:288
↓ 1 callersFunctiontim_sort
(arr: &mut [T])
src/sorting/tim_sort.rs:100
↓ 1 callersMethodtraverse_node
(&self, node: &Node<T>, depth: usize)
src/data_structures/b_tree.rs:134
↓ 1 callersMethodupdate
function to update a tree node
src/data_structures/segment_tree.rs:56
↓ 1 callersFunctionxor
XOR cipher # Arguments `text` - A string slice that holds the text to be ciphered. `key` - A u8 that holds the key to be used for ciphering. # Retu
src/ciphers/xor.rs:22
↓ 1 callersFunctionz_array
(input: &[T])
src/string/z_algorithm.rs:43
Function_check_part
Check if a string is a valid morse code part. This function checks if a string contains only valid morse code characters ('.', '-', and ' '). # Argu
src/ciphers/morse_code.rs:129
Function_decode_token
Decode a morse code token into an alphanumeric character. This function decodes a morse code token into its corresponding alphanumeric character. It
src/ciphers/morse_code.rs:209
Functiona_few_separate_matches
()
src/string/rabin_karp.rs:97
Functiona_few_separate_matches
()
src/string/knuth_morris_pratt.rs:72
Functionabr_hash
()
src/string/rabin_karp.rs:78
Functionacyclic
()
src/graphs/strongly_connected_components.rs:110
Methodadd
Add `val` to the `i`-th element # Arguments `i` - The index of the element to add `val` to `val` - The value to add to the `i`-th element # Example
src/data_structures/fenwick_tree.rs:77
Methodadd
(self, other: Complex64)
src/math/fast_fourier_transform.rs:47
Methodadd_edge
(&mut self, edge: (&'a T, &'a T, i32))
src/data_structures/graph.rs:84
Functionalmost_equal
(a: f64, b: f64, epsilon: f64)
src/math/fast_fourier_transform.rs:172
Functionalmost_equal
(a: f64, b: f64, eps: f64)
src/math/simpson_integration.rs:29
Functionalternate_mutations
()
src/data_structures/stack.rs:78
Functionalternate_mutations
()
src/data_structures/queue.rs:72
Functionamount_zero
()
src/dynamic_programming/coin_change.rs:54
Functionanother_rot13
Applies the ROT13 cipher to the given text. ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the
src/ciphers/another_rot13.rs:26
Functionarea_under_cosine
()
src/math/simpson_integration.rs:45
Functionascii_avalanche
()
src/ciphers/sha256.rs:212
Functionbaby_step_giant_step
(a: usize, b: usize, n: usize)
src/math/baby_step_giant_step.rs:12
Functionbalanced
()
src/data_structures/avl_tree.rs:499
Functionbasic
()
src/string/burrows_wheeler_transform.rs:46
Functionbasic
()
src/math/miller_rabin.rs:69
Functionbasic
()
src/math/newton_raphson.rs:24
Functionbasic
()
src/math/sieve_of_eratosthenes.rs:34
Functionbasic
()
src/math/extended_euclidean_algorithm.rs:28
Functionbasic
()
src/math/perfect_numbers.rs:31
Functionbasic
()
src/math/trial_division.rs:41
Functionbasic
()
src/math/prime_check.rs:22
Functionbasic
()
src/math/prime_numbers.rs:29
Functionbasic
()
src/dynamic_programming/coin_change.rs:37
Functionbasics
()
src/data_structures/stack_using_singly_linked_list.rs:170
Functionbellman_ford
performs the Bellman-Ford algorithm on the given graph from the given start the graph is an undirected graph if there is a negative weighted loop it
src/graphs/bellman_ford.rs:14
Functionbig_armstrong_number
()
src/math/armstrong_number.rs:41
Functionbig_numbers
()
src/math/pollard_rho.rs:250
Functionbinary_search_rec
( list_of_items: &[T], target: &T, left: &usize, right: &usize, )
src/searching/binary_search_recursive.rs:3
Functionbit_distance
Calculates the bit distance between two numbers. Returns the number of different bits between `a` and `b`. see: [Hamming Distance](https://en.wikipe
src/bit_manipulation/basic.rs:469
Functionbit_equivalence
Counts the number of equal bits between two numbers. Returns the number of equal bits between `a` and `b`. see: [Hamming Distance](https://en.wikipe
src/bit_manipulation/basic.rs:436
Functionblock_move
()
src/graphs/depth_first_search_tic_tac_toe.rs:374
Functionblock_win_move
()
src/graphs/depth_first_search_tic_tac_toe.rs:357
Functionbogo_bogo_sort
(arr: &[T])
src/sorting/bogo_bogo_sort.rs:10
Functionbra_hash
()
src/string/rabin_karp.rs:84
Functionbreadth_first_search
(graph: &Graph, start: Vertex, end: Vertex)
src/graphs/breadth_first_search.rs:4
Methodbuild_suffix
(root: Rc<RefCell<ACNode>>)
src/string/aho_corasick.rs:32
Functionbuilds_pi_correctly
()
src/string/knuth_morris_pratt.rs:57
Functionburrows_wheeler_transform
(input: String)
src/string/burrows_wheeler_transform.rs:1
Functioncaesar
Implements the Caesar Cipher based on cipher_crypt::caesar Rotates each ascii character by shift. The most basic example is ROT 13, which rotates 'a'
src/ciphers/caesar.rs:27
Functioncaesar_rot_13
()
src/ciphers/caesar.rs:52
Functioncaesar_unicode
()
src/ciphers/caesar.rs:57
Functioncheck_factorization
(number: u64, factors: &[u64])
src/math/pollard_rho.rs:207
Functioncheck_factorization
()
src/math/linear_sieve.rs:105
Functioncheck_is_proper_factor
(number: u64, factor: u64)
src/math/pollard_rho.rs:203
Functioncheck_number_of_primes
()
src/math/linear_sieve.rs:123
Functioncipolla
return two solutions (x1, x2) for Quadratic Residue problem x^2 = a (mod p), where p is an odd prime if a is Quadratic Nonresidues, return None
src/math/quadratic_residue.rs:75
Functionclassical_fibonacci
classical_fibonacci(n) returns the nth fibonacci number This function uses the definition of Fibonacci where: F(0) = 0, F(1) = 1 and F(n+1) = F(n) + F
src/dynamic_programming/fibonacci.rs:47
Functionclosest_points
returns the two closest points or None if there are zero or one point
src/geometry/closest_points.rs:18
Functioncoin_change
Coin change via Dynamic Programming coin_change(coins, amount) returns the fewest number of coins that need to make up that amount. If that amount of
src/dynamic_programming/coin_change.rs:12
Functioncoin_problem
Coin Change Problem # Algorithm The vector coins holds all types of coins. The input argument n represents the value which has to be put together wi
src/dynamic_programming/coin_problem.rs:32
Functioncoins_empty
()
src/dynamic_programming/coin_change.rs:48
Functionconcats
()
src/data_structures/rope.rs:253
Functionconnected_dumbbell
()
src/graphs/strongly_connected_components.rs:148
Methodcontains
(&self, node: &'a T)
src/data_structures/graph.rs:102
Methodcontains
Checks if an element may be in the Bloom Filter NOTE: `true` implies the element may be in the set, `false` implies the element is not in the set. The
src/data_structures/bloom_filter.rs:89
Functionconvex_hull_graham
If three points are aligned and are part of the convex hull then the three are kept. If one doesn't want to keep those points, it is easy to itera
src/general/convex_hull.rs:32
Functioncreate_acyclic_graph
()
src/graphs/disjoint_set_union.rs:49
Functioncycle
()
src/graphs/strongly_connected_components.rs:120
Functiondecode_ascii
Decode a string of ints into their corresponding letters in a Polybius square. Any invalid characters, or whitespace will be ignored. # Arguments `
src/ciphers/polybius.rs:77
Functiondecode_emoji
()
src/ciphers/polybius.rs:140
Functiondecode_empty
()
src/ciphers/polybius.rs:135
Functiondecode_odd_length
()
src/ciphers/polybius.rs:158
Functiondecode_string_with_whitespace
()
src/ciphers/polybius.rs:145
Functiondecode_unknown_string
()
src/ciphers/polybius.rs:153
Functiondecrypt_invalid_morsecode_with_spaces
()
src/ciphers/morse_code.rs:299
Functiondecrypt_valid_character_set_invalid_morsecode
()
src/ciphers/morse_code.rs:282
Functiondecrypt_valid_morsecode_with_spaces
()
src/ciphers/morse_code.rs:271
Methoddefault
()
src/general/huffman_encoding.rs:125
Methoddefault
()
src/data_structures/rb_tree.rs:39
Methoddefault
Create a new, empty `BinarySearchTree`. # Examples ```rust use rust_algorithms::data_structures::BinarySearchTree; let tree: BinarySearchTree<i32>
src/data_structures/binary_search_tree.rs:60
Methoddefault
Creates an empty `AVLTree`. # Examples ```rust use rust_algorithms::data_structures::AVLTree; let tree: AVLTree<i32> = Default::default(); assert!
src/data_structures/avl_tree.rs:388
Methoddefault
Create a new HashTable with the default initial capacity. # Examples: ```rust use rust_algorithms::data_structures::HashTable; let hash_table: Hash
src/data_structures/hashtable.rs:53
Methoddefault
()
src/data_structures/stack_using_singly_linked_list.rs:93
Methoddefault
()
src/math/fast_fourier_transform.rs:38
Methoddel_min
Deletes the minimum key in the `MinHeap`. # Returns: The minimum key in the `MinHeap`. # Panics: If the heap is empty. # Examples: ```rust use r
src/data_structures/heap.rs:438
← previousnext →301–400 of 990, ranked by callers