Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alexfertel/rust-algorithms
/ functions
Functions
990 in github.com/alexfertel/rust-algorithms
⨍
Functions
990
◇
Types & classes
106
↓ 3 callers
Method
decompose
(&mut self, root: usize, adj: &Adj)
src/graphs/heavy_light_decomposition.rs:66
↓ 3 callers
Function
divide_by_two
Divides a number by two. Shifts the bits of `bits` one position to the right. see: [Bitwise Shift](https://en.wikipedia.org/wiki/Bitwise_operation#B
src/bit_manipulation/basic.rs:259
↓ 3 callers
Method
encode
(&self, data: &[T])
src/general/huffman_encoding.rs:112
↓ 3 callers
Function
enumerate_graph
This function creates a graph with vertices numbered from 1 to n for any input `Graph<V>`. The result is in the form of Vec<Vec<usize> to make impleme
src/graphs/graph_enumeration.rs:13
↓ 3 callers
Function
f64_cmp
(a: &f64, b: &f64)
src/geometry/closest_points.rs:12
↓ 3 callers
Function
fast_fourier_transform
(input: &[f64], input_permutation: &[usize])
src/math/fast_fourier_transform.rs:113
↓ 3 callers
Function
fast_fourier_transform_input_permutation
(length: usize)
src/math/fast_fourier_transform.rs:88
↓ 3 callers
Method
hash
(&self)
src/data_structures/hashtable.rs:66
↓ 3 callers
Method
insert
(&mut self, key: K, value: V)
src/data_structures/rb_tree.rs:63
↓ 3 callers
Function
inverse_fast_fourier_transform
( input: &[Complex64], input_permutation: &[usize], )
src/math/fast_fourier_transform.rs:139
↓ 3 callers
Function
matrix_add
(summand0: &[Vec<i32>], summand1: &[Vec<i32>])
src/math/matrix_ops.rs:5
↓ 3 callers
Function
matrix_subtract
(minuend: &[Vec<i32>], subtrahend: &[Vec<i32>])
src/math/matrix_ops.rs:23
↓ 3 callers
Method
merge
Returns the new component of the merged sets, or std::usize::MAX if they were the same.
src/graphs/disjoint_set_union.rs:30
↓ 3 callers
Function
multiply
(num1: i128, num2: i128)
src/math/karatsuba_multiplication.rs:7
↓ 3 callers
Function
multiply_by_two
Multiplies a number by two. Shifts the bits of `bits` one position to the left. see: [Bitwise Shift](https://en.wikipedia.org/wiki/Bitwise_operation
src/bit_manipulation/basic.rs:231
↓ 3 callers
Function
pollard_rho_get_one_factor
Note: using this function with `check_is_prime` = false and a prime number will result in an infinite loop. RNG's internal state is represented as `s
src/math/pollard_rho.rs:104
↓ 3 callers
Function
precompute_table
(pattern: &str)
src/string/knuth_morris_pratt.rs:1
↓ 3 callers
Function
prufer_encode
(tree: &Graph<V>)
src/graphs/prufer_code.rs:5
↓ 3 callers
Method
update_height
Recomputes the `height` field.
src/data_structures/avl_tree.rs:339
↓ 3 callers
Function
update_step
(a: &mut i32, old_a: &mut i32, quotient: i32)
src/math/extended_euclidean_algorithm.rs:1
↓ 3 callers
Function
word_to_bytes
word_to_bytes converts the given word to an AESWord byte array. # Arguments `word` - The word to convert to an AESWord byte array. # Returns The A
src/ciphers/aes.rs:734
↓ 2 callers
Function
_logarithmic_fibonacci
(n: u32)
src/dynamic_programming/fibonacci.rs:82
↓ 2 callers
Function
add_directed_edge
(tree: &mut Graph<V>, a: V, b: V)
src/graphs/prufer_code.rs:34
↓ 2 callers
Method
adjacency_table_mutable
(&mut self)
src/data_structures/graph.rs:27
↓ 2 callers
Method
advance
Advance the PCG by `delta` steps in O(lg(`delta`)) time. By passing a negative i64 as u64, it can go back too.
src/math/random.rs:56
↓ 2 callers
Function
bytes_to_word
bytes_to_word converts the given bytes to a word. # Arguments `bytes` - The bytes to convert to a word # Returns The word # Panics This function
src/ciphers/aes.rs:715
↓ 2 callers
Function
color_graph
(graph: &'a UndirectedGraph<T>)
src/general/graph_coloring.rs:6
↓ 2 callers
Method
count
Returns the number of disjoint sets
src/data_structures/union_find.rs:54
↓ 2 callers
Function
count_ones
Counts the number of ones in a number. Returns the number of ones in `bits`. see: [Hamming Weight](https://en.wikipedia.org/wiki/Hamming_weight) #
src/bit_manipulation/basic.rs:400
↓ 2 callers
Function
counting_sort
(arr: &[T])
src/sorting/counting_sort.rs:3
↓ 2 callers
Method
decompose_tree
(&mut self, adj: &Adj)
src/graphs/centroid_decomposition.rs:102
↓ 2 callers
Method
del
(&mut self, less: fn(T, T) -> bool)
src/data_structures/heap.rs:88
↓ 2 callers
Method
del_max
Deletes the maximum key in the `MaxHeap`. # Returns: The maximum key in the `MaxHeap`. # Panics: If the heap is empty. # Examples: ```rust use r
src/data_structures/heap.rs:268
↓ 2 callers
Method
delete_at
( self: Box<Rope>, start: usize, length: usize, )
src/data_structures/rope.rs:180
↓ 2 callers
Method
dfs
(&mut self, v: usize, pushed: T)
src/graphs/dinic_maxflow.rs:106
↓ 2 callers
Function
double_to_int
(amount: f64)
src/math/trial_division.rs:6
↓ 2 callers
Function
fast_power
fast_power returns the result of base^power mod modulus
src/math/fast_power.rs:2
↓ 2 callers
Method
find_maxflow
(&mut self, infinite_flow: T)
src/graphs/dinic_maxflow.rs:134
↓ 2 callers
Function
floor
(value: f64, scale: u8)
src/math/trial_division.rs:1
↓ 2 callers
Method
floor
Gets the largest value in this tree smaller than value # Arguments `value` - The floor that limits the maximum value returned. # Returns The large
src/data_structures/binary_search_tree.rs:319
↓ 2 callers
Function
from_block
(block: u64)
src/ciphers/tea.rs:155
↓ 2 callers
Function
gcd
(mut a: u64, mut b: u64)
src/math/pollard_rho.rs:27
↓ 2 callers
Method
get_64bits
(&mut self)
src/math/pollard_rho.rs:22
↓ 2 callers
Function
get_bit
Gets specific bits from a number. Returns the value of the bit at position `n` in `bits`. see: [Get Bit](https://en.wikipedia.org/wiki/Bit_manipulat
src/bit_manipulation/basic.rs:27
↓ 2 callers
Function
get_discover_time
(vertex_state: u64)
src/graphs/strongly_connected_components.rs:49
↓ 2 callers
Function
get_frequency
(bytes: &[u8])
src/general/huffman_encoding.rs:174
↓ 2 callers
Function
get_hash_functions
Get a vector of hash functions (since they are closures, we can't clone them)
src/data_structures/bloom_filter.rs:274
↓ 2 callers
Method
get_u64
(&mut self)
src/math/random.rs:83
↓ 2 callers
Method
is_empty
(&self)
src/data_structures/heap.rs:71
↓ 2 callers
Method
is_in_decomposition
(&self, v: usize)
src/graphs/centroid_decomposition.rs:46
↓ 2 callers
Method
is_maxed_out
(&self, node: &Node<T>)
src/data_structures/b_tree.rs:84
↓ 2 callers
Function
is_residue
(x: u64, modulus: u64)
src/math/quadratic_residue.rs:68
↓ 2 callers
Function
is_unvisited
(vertex_state: u64)
src/graphs/strongly_connected_components.rs:44
↓ 2 callers
Function
key_expansion
key_expansion expands the given initial key into a key schedule. The key schedule is used to generate round keys for each round of the AES algorithm.
src/ciphers/aes.rs:468
↓ 2 callers
Function
kruskal
(mut edges: Vec<Edge>, number_of_vertices: i64)
src/graphs/minimum_spanning_tree.rs:30
↓ 2 callers
Function
lowbit
get the lowest bit of `i`
src/data_structures/fenwick_tree.rs:138
↓ 2 callers
Function
match_with_z_array
( input_string: &[T], pattern: &[T], start_index: usize, only_full_matches: bool, )
src/string/z_algorithm.rs:1
↓ 2 callers
Function
matrix_multiply
(multiplier: &[Vec<i32>], multiplicand: &[Vec<i32>])
src/math/matrix_ops.rs:45
↓ 2 callers
Function
merge_sort
(array: &[T])
src/sorting/merge_sort.rs:3
↓ 2 callers
Function
miller_rabin
(number: u64, bases: &[u64])
src/math/miller_rabin.rs:34
↓ 2 callers
Function
mix_column_blocks
mix_column_blocks applies the AES MixColumns operation to each block in the given data. The data is modified in place. # Arguments `data` - The data
src/ciphers/aes.rs:551
↓ 2 callers
Method
neighbors
(&self, graph: &Graph)
src/graphs/representation.rs:26
↓ 2 callers
Method
next
(&mut self)
src/graphs/heavy_light_decomposition.rs:109
↓ 2 callers
Method
next
(&mut self)
src/math/pollard_rho.rs:18
↓ 2 callers
Method
node_iter
Returns an iterator that visits the nodes in the tree in order.
src/data_structures/avl_tree.rs:193
↓ 2 callers
Function
normalize
(mut a: String, n: usize)
src/math/karatsuba_multiplication.rs:37
↓ 2 callers
Method
num_parents
(&self, v: usize)
src/graphs/lowest_common_ancestor.rs:33
↓ 2 callers
Function
pancake_sort
(arr: &mut [T])
src/sorting/pancake_sort.rs:3
↓ 2 callers
Method
push_front
(&mut self, val: T)
src/data_structures/linked_list.rs:49
↓ 2 callers
Method
resize
(&mut self)
src/data_structures/hashtable.rs:193
↓ 2 callers
Method
rotate
Performs a left or right rotation.
src/data_structures/avl_tree.rs:344
↓ 2 callers
Function
siftdown
(array: &mut [T], mut root: usize, end: usize)
src/sorting/heap_sort.rs:25
↓ 2 callers
Function
simpson_integration
This gives a better approximation than naive approach See https://en.wikipedia.org/wiki/Simpson%27s_rule
src/math/simpson_integration.rs:3
↓ 2 callers
Method
sort
(array: &[T])
src/sorting/merge_sort.rs:50
↓ 2 callers
Method
split_child
Split Child expects the Child Node to be full Move the middle_key to parent node and split the child_node's keys/chilren_nodes into half
src/data_structures/b_tree.rs:91
↓ 2 callers
Method
square_norm
(&self)
src/math/fast_fourier_transform.rs:17
↓ 2 callers
Method
stack_push_left
(&mut self)
src/data_structures/binary_search_tree.rs:433
↓ 2 callers
Function
sub_bytes
sub_bytes applies the AES S-Box/InvS-Box to the given data. The data is modified in place. # Arguments `data` - The data to apply the S-Box/InvS-Box
src/ciphers/aes.rs:609
↓ 2 callers
Function
sub_word
sub_word applies the AES S-Box/InvS-Box to the given word. # Arguments `word` - The word to apply the S-Box/InvS-Box to `mode` - The AES mode to use
src/ciphers/aes.rs:595
↓ 2 callers
Function
ternary_search_max
Ternary search algorithm for finding maximum of unimodal function
src/searching/ternary_search_min_max.rs:2
↓ 2 callers
Function
ternary_search_max_rec
Recursive ternary search algorithm for finding maximum of unimodal function
src/searching/ternary_search_min_max_recursive.rs:2
↓ 2 callers
Function
ternary_search_min
Ternary search algorithm for finding minimum of unimodal function
src/searching/ternary_search_min_max.rs:28
↓ 2 callers
Function
ternary_search_min_rec
Recursive ternary search algorithm for finding minimum of unimodal function
src/searching/ternary_search_min_max_recursive.rs:27
↓ 1 callers
Function
_check_all_parts
Check if a string is a valid morse code. This function checks if a string is a valid morse code by splitting it into parts and checking each part. #
src/ciphers/morse_code.rs:150
↓ 1 callers
Function
_decode_part
Decode a morse code part into an alphanumeric string. This function decodes a morse code part into its corresponding alphanumeric string. It splits t
src/ciphers/morse_code.rs:228
↓ 1 callers
Function
_kth_smallest
(input: &mut [T], k: usize, lo: usize, hi: usize)
src/searching/kth_smallest.rs:42
↓ 1 callers
Function
_memoized_fibonacci
(n: u32, cache: &mut HashMap<u32, u128>)
src/dynamic_programming/fibonacci.rs:105
↓ 1 callers
Function
_morse_dictionary
Create the morse code to alphanumeric dictionary. This function creates a HashMap that maps each morse code sequence to its corresponding alphanumeri
src/ciphers/morse_code.rs:59
↓ 1 callers
Function
_morse_to_alphanumeric_dictionary
Create the morse code to alphanumeric dictionary. This function creates a HashMap that maps each morse code sequence to its corresponding alphanumeri
src/ciphers/morse_code.rs:92
↓ 1 callers
Function
_multiply
(num1: i128, num2: i128)
src/math/karatsuba_multiplication.rs:11
↓ 1 callers
Function
_recursive_fibonacci
(n: u32, previous: u128, current: u128)
src/dynamic_programming/fibonacci.rs:34
↓ 1 callers
Function
_stooge_sort
(arr: &mut [T], start: usize, end: usize)
src/sorting/stooge_sort.rs:3
↓ 1 callers
Function
_tim_sort
(arr: &mut [T], n: usize)
src/sorting/tim_sort.rs:75
↓ 1 callers
Method
add_data
(&mut self, data: HuffmanValue)
src/general/huffman_encoding.rs:138
↓ 1 callers
Method
add_query
(&mut self, u: usize, v: usize, query_id: usize)
src/graphs/lowest_common_ancestor.rs:131
↓ 1 callers
Method
answer_queries
(&mut self, root: usize, adj: &[Vec<usize>])
src/graphs/lowest_common_ancestor.rs:169
↓ 1 callers
Method
bfs
(&mut self)
src/graphs/dinic_maxflow.rs:84
↓ 1 callers
Function
bogo_sort
(arr: &mut [T])
src/sorting/bogo_sort.rs:44
↓ 1 callers
Function
bubble_sort
(arr: &mut [T])
src/sorting/bubble_sort.rs:3
↓ 1 callers
Function
bucket_sort
(arr: &mut [T])
src/sorting/bucket_sort.rs:4
← previous
next →
101–200 of 990, ranked by callers