MCPcopy Create free account

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

Functions990 in github.com/alexfertel/rust-algorithms

↓ 1 callersFunctioncalc_chunk
Calculates the next chunk of data to process in the SHA256 algorithm. # Arguments `chunk` - The buffer to store the next chunk of data. `state` - Th
src/ciphers/sha256.rs:155
↓ 1 callersFunctioncalc_z_coord_vector_product
calculates the z coordinate of the vector product of vectors ab and ac
src/general/convex_hull.rs:21
↓ 1 callersMethodcalculate_answers
( &mut self, vertex: usize, parent: usize, adj: &[Vec<usize>], answers
src/graphs/lowest_common_ancestor.rs:141
↓ 1 callersFunctioncalculate_height
(v: usize, heights: &mut [usize], parents: &mut [usize])
src/graphs/centroid_decomposition.rs:112
↓ 1 callersMethodcapacity
Determines the capacity of the hash table, which is the number of buckets available for storing elements. The capacity is not the same as the number o
src/data_structures/hashtable.rs:158
↓ 1 callersMethodceil
Gets the smallest value in this tree larger than value. # Arguments `value` - The ceil that limits the minimum value returned. # Returns The small
src/data_structures/binary_search_tree.rs:378
↓ 1 callersFunctioncheck_prime_base
(number: u64, base: u64, two_power: u64, odd_power: u64)
src/math/miller_rabin.rs:18
↓ 1 callersMethodchild
Returns a reference to the left or right child.
src/data_structures/avl_tree.rs:308
↓ 1 callersFunctionclear_bit
Clears a specific bit in a number. Sets the bit at position `n` in `bits` to 0. see: [Clear Bit](https://en.wikipedia.org/wiki/Bit_manipulation) #
src/bit_manipulation/basic.rs:86
↓ 1 callersFunctionclosest_points_aux
( points: &[Point], mut start: usize, mut end: usize, )
src/geometry/closest_points.rs:32
↓ 1 callersFunctioncocktail_shaker_sort
(arr: &mut [T])
src/sorting/cocktail_shaker_sort.rs:3
↓ 1 callersFunctioncomb_sort
(arr: &mut [T])
src/sorting/comb_sort.rs:3
↓ 1 callersFunctioncount_prime
(primes: Vec<u64>, n: u64)
src/math/nthprime.rs:40
↓ 1 callersFunctioncycle_sort
(arr: &mut [T])
src/sorting/cycle_sort.rs:3
↓ 1 callersMethoddecompose_path
(&mut self, v: usize, parent: usize, head: usize, adj: &Adj)
src/graphs/heavy_light_decomposition.rs:71
↓ 1 callersMethoddecompose_subtree
( &mut self, v: usize, centroid_parent: usize, calculate_vert_size: bool,
src/graphs/centroid_decomposition.rs:74
↓ 1 callersMethoddecrypt_block
Decrypt a block of data. # Arguments `block` - The block of data to decrypt. # Returns The decrypted block of data.
src/ciphers/tea.rs:53
↓ 1 callersFunctiondelete_fixup
(tree: &mut RBTree<K, V>, mut parent: *mut RBNode<K, V>)
src/data_structures/rb_tree.rs:364
↓ 1 callersMethoddfs
(&mut self, v: usize, adj: &[Vec<usize>])
src/graphs/strongly_connected_components.rs:64
↓ 1 callersMethoddfs
(&mut self, v: usize, parent: usize, adj: &Adj)
src/graphs/heavy_light_decomposition.rs:48
↓ 1 callersMethoddfs_centroid
(&self, v: usize, size_thr: usize)
src/graphs/centroid_decomposition.rs:67
↓ 1 callersMethoddfs_size
(&mut self, v: usize, parent: usize, adj: &Adj)
src/graphs/centroid_decomposition.rs:49
↓ 1 callersFunctionechelon
(matrix: &mut [Vec<f32>], i: usize, j: usize)
src/math/gaussian_elimination.rs:36
↓ 1 callersFunctioneliminate
(matrix: &mut [Vec<f32>], i: usize)
src/math/gaussian_elimination.rs:47
↓ 1 callersFunctionencode_ascii
Encode an ASCII string into its location in a Polybius square. Only alphabetical characters are encoded. # Arguments `string` - The ASCII string to
src/ciphers/polybius.rs:21
↓ 1 callersMethodencrypt_block
Encrypt a block of data. # Arguments `block` - The block of data to encrypt. # Returns The encrypted block of data.
src/ciphers/tea.rs:28
↓ 1 callersMethodeq
(&self, other: &Self)
src/general/huffman_encoding.rs:24
↓ 1 callersMethodexch
(&mut self, i: usize, j: usize)
src/data_structures/heap.rs:104
↓ 1 callersFunctionexchange_sort
(arr: &mut [T])
src/sorting/exchange_sort.rs:3
↓ 1 callersFunctionfactor_using_mpf
(mut number: usize, mpf: &[usize])
src/math/pollard_rho.rs:148
↓ 1 callersMethodfactorize
(&self, mut number: usize)
src/math/linear_sieve.rs:63
↓ 1 callersMethodfill_sparse_table
( &mut self, vertex: usize, parent: usize, height: usize, adj: &[Vec<u
src/graphs/lowest_common_ancestor.rs:44
↓ 1 callersFunctiongcd_of_two_numbers
(a: usize, b: usize)
src/math/gcd_of_n_numbers.rs:11
↓ 1 callersFunctiongcd_of_two_numbers
(a: usize, b: usize)
src/math/lcm_of_n_numbers.rs:12
↓ 1 callersFunctiongenerate_index
(range: usize, generator: &mut PCG32)
src/sorting/bogo_sort.rs:21
↓ 1 callersMethodget_alphabet
Turn the tree into the map that can be used in encoding.
src/general/huffman_encoding.rs:45
↓ 1 callersMethodget_ancestor
(&self, mut v: usize, mut u: usize)
src/graphs/lowest_common_ancestor.rs:69
↓ 1 callersMethodget_bit
(&self, pos: u64)
src/general/huffman_encoding.rs:147
↓ 1 callersMethodget_flow_edges
(&mut self, infinite_flow: T)
src/graphs/dinic_maxflow.rs:155
↓ 1 callersFunctionget_num_paths
( hld: &HeavyLightDecomposition, mut v: usize, parent: &[usize], )
src/graphs/heavy_light_decomposition.rs:116
↓ 1 callersFunctionget_primes
(s: u64)
src/math/nthprime.rs:23
↓ 1 callersFunctionget_small_factors
(mut number: u64, primes: &[usize])
src/math/pollard_rho.rs:137
↓ 1 callersFunctiongnome_sort
(arr: &mut [T])
src/sorting/gnome_sort.rs:3
↓ 1 callersFunctionhanoi
(n: i32, from: i32, to: i32, via: i32, moves: &mut Vec<(i32, i32)>)
src/general/hanoi.rs:1
↓ 1 callersFunctionheap_sort
(array: &mut [T])
src/sorting/heap_sort.rs:3
↓ 1 callersFunctionheapify
(array: &mut [T])
src/sorting/heap_sort.rs:18
↓ 1 callersFunctioninsert
Function to insert a new Node with given key in BST
src/sorting/tree_sort.rs:24
↓ 1 callersFunctioninsert
Recursive helper function for `AVLTree` insertion.
src/data_structures/avl_tree.rs:230
↓ 1 callersMethodinsert
Adds a value to the tree. # Returns `true` if the tree did not yet contain the value, `false` otherwise. # Examples ```rust use rust_algorithms::d
src/data_structures/avl_tree.rs:119
↓ 1 callersFunctioninsert_fixup
(tree: &mut RBTree<K, V>, mut node: *mut RBNode<K, V>)
src/data_structures/rb_tree.rs:239
↓ 1 callersMethodinsert_non_full
(&mut self, node: &mut Node<T>, key: T)
src/data_structures/b_tree.rs:112
↓ 1 callersFunctioninsertion
shell sort works by swiping the value at a given gap and decreasing the gap to 1
src/sorting/shell_sort.rs:5
↓ 1 callersFunctioninsertion_sort
(arr: &mut [T])
src/sorting/insertion_sort.rs:3
↓ 1 callersFunctioninsertion_sort
(arr: &mut [T], left: usize, right: usize)
src/sorting/tim_sort.rs:15
↓ 1 callersMethodinto_iter_for_stack
(self)
src/data_structures/stack_using_singly_linked_list.rs:76
↓ 1 callersMethodis_empty
Check if the BTree is empty. # Returns `true` if the BTree is empty, `false` otherwise. # Examples ```rust use rust_algorithms::data_structures::B
src/data_structures/b_tree.rs:239
↓ 1 callersMethodis_empty
Determines if this tree is empty. # Returns `true`` if this tree is empty, and `false`` otherwise. # Examples ```rust use rust_algorithms::data_st
src/data_structures/binary_search_tree.rs:105
↓ 1 callersFunctionis_even
Checks if a number is even. Returns true if the least significant bit of `bits` is 0, otherwise false. see: [Parity](https://en.wikipedia.org/wiki/P
src/bit_manipulation/basic.rs:166
↓ 1 callersFunctionis_in_stack
(vertex_state: u64)
src/graphs/strongly_connected_components.rs:39
↓ 1 callersFunctionis_perfect_number
(num: usize)
src/math/perfect_numbers.rs:1
↓ 1 callersFunctionis_positive
Checks if a number is positive. Returns true if the most significant bit of `bits` is 0, otherwise false. see: [Sign Bit](https://en.wikipedia.org/w
src/bit_manipulation/basic.rs:199
↓ 1 callersFunctionis_safe
Checks if given position on board is safe This function is part of the nqueens algorithms and checks if given position on the chess board is safe to
src/general/nqueens.rs:26
↓ 1 callersFunctionis_sorted
(arr: &[T], len: usize)
src/sorting/bogo_sort.rs:7
↓ 1 callersFunctionis_sorted
(arr: &[T])
src/sorting/bogo_bogo_sort.rs:4
↓ 1 callersMethoditer
Creates an iterator which iterates over this tree in ascending order # Examples ```rust use rust_algorithms::data_structures::BinarySearchTree; let
src/data_structures/binary_search_tree.rs:181
↓ 1 callersMethoditer
(&self)
src/data_structures/stack_using_singly_linked_list.rs:79
↓ 1 callersFunctioniteration
(f: fn(f64) -> f64, fd: fn(f64) -> f64, guess: f64)
src/math/newton_raphson.rs:9
↓ 1 callersFunctionknapsack_items
knapsack_items(weights, m, i, j) returns the indices of the items of the optimal knapsack (from 1 to `n`) Arguments: `weights` - set of weights for e
src/dynamic_programming/knapsack.rs:44
↓ 1 callersFunctionknapsack_table
knapsack_table(w, weights, values) returns the knapsack table (`n`, `m`) with maximum values, where `n` is number of items Arguments: `w` - knapsack
src/dynamic_programming/knapsack.rs:10
↓ 1 callersFunctionmanacher
(s: String)
src/string/manacher.rs:1
↓ 1 callersFunctionmax_min
Function for finding the maximum and minimum element of the Array
src/sorting/bingo_sort.rs:4
↓ 1 callersFunctionmerge
(left: &mut Vec<T>, right: &mut Vec<T>)
src/sorting/merge_sort.rs:16
↓ 1 callersFunctionmerge
( arr: &mut [T], l: usize, m: usize, r: usize, )
src/sorting/tim_sort.rs:29
↓ 1 callersFunctionmerge
Merges two trees and returns the root of the merged tree.
src/data_structures/avl_tree.rs:277
↓ 1 callersFunctionmin_run_length
(mut n: usize)
src/sorting/tim_sort.rs:6
↓ 1 callersFunctionmix_column
mix_column applies the AES MixColumns/InvMixColumns operation to the given block. The block is modified in place. # Arguments `block` - The block to
src/ciphers/aes.rs:649
↓ 1 callersFunctionmodulo_power
(mut base: u64, mut power: u64, modulo: u64)
src/math/miller_rabin.rs:1
↓ 1 callersMethodmult_other
(&mut self, rhs: &Self)
src/math/quadratic_residue.rs:39
↓ 1 callersMethodmult_self
(&mut self)
src/math/quadratic_residue.rs:47
↓ 1 callersMethodneighbours
(&self, node: &'a T)
src/data_structures/graph.rs:95
↓ 1 callersFunctionnew_node
Function to create a new BST Node
src/sorting/tree_sort.rs:15
↓ 1 callersMethodnodes
(&self)
src/data_structures/graph.rs:106
↓ 1 callersFunctionnumber_to_day
(number: i32)
src/math/zellers_congruence_algorithm.rs:30
↓ 1 callersFunctionodd_even_sort
(arr: &mut [T])
src/sorting/odd_even_sort.rs:3
↓ 1 callersFunctionpartition
(arr: &mut [T], lo: isize, hi: isize)
src/searching/kth_smallest.rs:3
↓ 1 callersFunctionpartition
( list: &mut [T], left: usize, right: usize, pivot_index: usize, )
src/searching/quick_select.rs:3
↓ 1 callersMethodpeek
(&self)
src/data_structures/heap.rs:97
↓ 1 callersMethodpeek_back
(&self)
src/data_structures/linked_list.rs:166
↓ 1 callersMethodpeek_front
(&self)
src/data_structures/linked_list.rs:159
↓ 1 callersMethodpeek_mut
(&mut self)
src/data_structures/stack_using_singly_linked_list.rs:69
↓ 1 callersFunctionpermute_randomly
* Fisher–Yates shuffle for generating random permutation. */
src/sorting/bogo_sort.rs:33
↓ 1 callersFunctionpollard_rho_customizable
( number: u64, x0: u64, c: u64, iterations_before_check: u32, iterations_cutoff: u32, )
src/math/pollard_rho.rs:41
↓ 1 callersMethodpop
In pop function, we trying to: check if the list is empty, so we use enum Option<T>, it can either be Some(T) or None if it's empty, return None if it
src/data_structures/stack_using_singly_linked_list.rs:46
↓ 1 callersMethodpop_back
(&mut self)
src/data_structures/linked_list.rs:113
↓ 1 callersFunctionprim_with_start
Only works for a connected graph. If the given graph is not connected it will return the MST of the connected subgraph.
src/graphs/prim.rs:24
↓ 1 callersMethodput_in_decomposition
(&mut self, v: usize, parent: usize)
src/graphs/centroid_decomposition.rs:41
↓ 1 callersFunctionquick_sort
(array: &mut [T])
src/sorting/quick_sort.rs:3
↓ 1 callersFunctionradix_sort
(arr: &mut [T])
src/sorting/radix_sort.rs:3
↓ 1 callersFunctionrecalculate_hash
new_hash = (old_hash - BASE^(n-1) * s_(i-n)) * BASE + s_i
src/string/rabin_karp.rs:50
↓ 1 callersFunctionremove
Recursive helper function for `AVLTree` deletion.
src/data_structures/avl_tree.rs:253
← previousnext →201–300 of 990, ranked by callers