Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EbTech/rust-algorithms
/ functions
Functions
212 in github.com/EbTech/rust-algorithms
⨍
Functions
212
◇
Types & classes
33
Method
conjugate
(self)
src/math/num.rs:121
Method
counting_sort
O(n + max_key) stable sort on the items generated by vals. Items v in vals are sorted according to val_to_key[v].
src/string_proc.rs:214
Method
default
Creates an empty trie with a root node.
src/string_proc.rs:12
Method
default
()
src/range_query/dynamic_arq.rs:23
Method
div
(self, other: Self)
src/math/num.rs:87
Method
euler_path
Finds the sequence of edges in an Euler path starting from u, assuming it exists and that the graph is directed. Undefined behavior if this preconditi
src/graph/util.rs:10
Method
euler_recurse
Helper function used by euler_path. Note that we can't use a for-loop that would consume the adjacency list as recursive calls may need it.
src/graph/util.rs:22
Method
extract
(f: Self::F)
src/math/fft.rs:70
Function
factorize
Assuming x >= 1, finds the prime factorization of n TODO: pollard_rho needs randomization to ensure correctness in contest settings!
src/math/mod.rs:106
Function
fft
Computes the discrete fourier transform of v, whose length is a power of 2. Forward transform: polynomial coefficients -> evaluate at roots of unity I
src/math/fft.rs:116
Function
first_negative
An example of binary search to find the first position whose element is negative. The DynamicArq version works on trees of any size, not necessarily a
src/range_query/dynamic_arq.rs:172
Method
from
(num: i64)
src/math/num.rs:45
Method
from_polar
(r: f64, th: f64)
src/math/num.rs:112
Method
from_small
Avoids the % operation but requires -M <= x < M
src/math/num.rs:203
Method
get_factor
(n: usize, inverse: bool)
src/math/fft.rs:66
Method
get_roots
(n: usize, inverse: bool)
src/math/fft.rs:59
Method
identity
()
src/range_query/specs.rs:52
Method
index
(&self, row: usize)
src/math/num.rs:302
Method
index_mut
(&mut self, row: usize)
src/math/num.rs:308
Method
longest_common_prefix
Computes the length of longest common prefix of text[i..] and text[j..].
src/string_proc.rs:271
Function
main
()
tests/codeforces343d.rs:99
Function
merge_sort
A stable sort
src/order.rs:49
Method
min_cut
After running maximum flow, use this to recover the dual minimum cut.
src/graph/flow.rs:112
Method
mul
(self, other: Self)
src/math/num.rs:80
Method
neg
(self)
src/math/num.rs:51
Method
new
(reader: R)
src/scanner.rs:13
Method
new
Builds an index, given the full set of coordinates to compress.
src/order.rs:65
Method
new
Precomputes the automaton that allows linear-time string matching. # Example ``` use contest_algorithms::string_proc::Matcher; let byte_string: &[u8
src/string_proc.rs:79
Method
new
Construct a new RNG from a 64-bit seed.
src/rng.rs:23
Method
new
Creates a new tree, built to handle queries on the interval [left, right).
src/li_chao.rs:21
Method
new
Constuctor for the Casher # Examples ``` # use contest_algorithms::caching::Cacher; let mut squared = Cacher::new(|n: u32| n*n); ```
src/caching.rs:37
Method
new
(num_v: usize)
src/graph/connectivity.rs:15
Method
new
Initializes disjoint sets containing one element each.
src/graph/mod.rs:18
Method
new
Initializes an flow network with vmax vertices and no edges.
src/graph/flow.rs:19
Method
new
(n: usize)
src/math/fft.rs:11
Method
new
(num: i64, den: i64)
src/math/num.rs:23
Method
new
(vals: Vec<usize>)
src/range_query/sqrt_decomp.rs:73
Method
new
Initializes a static balanced binary tree on top of the given sequence.
src/range_query/static_arq.rs:27
Method
new
Initializes the data structure without creating any nodes.
src/range_query/dynamic_arq.rs:55
Method
next
(trie: &Trie<C>, fail: &[usize], mut node: usize, ch: &C)
src/string_proc.rs:130
Method
next_u32
(&mut self)
src/rng.rs:39
Method
one
(cols: usize)
src/math/num.rs:260
Method
op
(&a: &Self::S, &b: &Self::S)
src/range_query/specs.rs:49
Method
query
Returns the aggregate range query on all entries from l to r, inclusive.
src/range_query/dynamic_arq.rs:154
Function
reference
()
src/rng.rs:84
Function
slice_upper_bound
Assuming slice is sorted and totally ordered, returns the minimum i for which slice[i] > key, or slice.len() if no such i exists
src/order.rs:27
Method
sub
(self, other: Self)
src/math/num.rs:71
Function
test_ac_matching
()
src/string_proc.rs:390
Function
test_adj_list
()
src/graph/mod.rs:132
Function
test_basic_flow
()
src/graph/flow.rs:204
Function
test_biconnected
()
src/graph/connectivity.rs:230
Function
test_binary_search_rmq
()
src/range_query/mod.rs:121
Function
test_bounds
()
src/order.rs:155
Function
test_cacher_basically_works
()
src/caching.rs:80
Function
test_cacher_speed
()
src/caching.rs:106
Function
test_call_and_replace
()
src/caching.rs:120
Function
test_compile_stdio
()
src/scanner.rs:119
Function
test_complex
()
src/math/num.rs:404
Function
test_complex_convolution
()
src/math/fft.rs:216
Function
test_complex_dft
()
src/math/fft.rs:181
Function
test_convex_hull_trick
()
src/order.rs:213
Function
test_coord_compress
()
src/order.rs:191
Function
test_dfs
()
src/graph/util.rs:148
Function
test_dfs2
()
src/graph/util.rs:166
Function
test_dfs_space_complexity
()
src/graph/util.rs:184
Function
test_dijkstra
()
src/graph/util.rs:136
Function
test_dynamic_binary_search_rmq
()
src/range_query/mod.rs:134
Function
test_dynamic_range_sum
()
src/range_query/mod.rs:84
Function
test_dynamic_rmq
()
src/range_query/mod.rs:28
Function
test_dynamic_supply_demand
()
src/range_query/mod.rs:109
Function
test_egcd
()
src/math/mod.rs:132
Function
test_euler
()
src/graph/util.rs:111
Function
test_field
()
src/math/num.rs:420
Function
test_huge_rmq
()
src/range_query/mod.rs:58
Function
test_in_memory_io
()
src/scanner.rs:99
Function
test_in_memory_unsafe
()
src/scanner.rs:109
Function
test_kmp_matching
()
src/string_proc.rs:380
Function
test_li_chao_tree
()
src/li_chao.rs:88
Function
test_linalg
()
src/math/num.rs:443
Function
test_max_matching
()
src/graph/flow.rs:227
Function
test_merge_sort
()
src/order.rs:182
Function
test_merge_sorted
()
src/order.rs:171
Function
test_miller
()
src/math/mod.rs:153
Function
test_min_cost_flow
()
src/graph/flow.rs:214
Function
test_min_spanning_tree
()
src/graph/util.rs:122
Function
test_modexp
()
src/math/mod.rs:144
Function
test_modular_convolution
()
src/math/fft.rs:227
Function
test_modular_dft
()
src/math/fft.rs:196
Function
test_mos_algorithm
()
src/range_query/sqrt_decomp.rs:109
Function
test_palindrome
()
src/string_proc.rs:428
Function
test_panic_file
()
src/scanner.rs:130
Function
test_persistent_rmq
()
src/range_query/mod.rs:42
Function
test_pollard
()
src/math/mod.rs:166
Function
test_range_compress
()
src/order.rs:204
Function
test_range_sum
()
src/range_query/mod.rs:71
Function
test_rational
()
src/math/num.rs:382
Function
test_rmq
()
src/range_query/mod.rs:15
Function
test_suffix_array
()
src/string_proc.rs:405
Function
test_supply_demand
()
src/range_query/mod.rs:98
Function
test_toposort
()
src/graph/connectivity.rs:198
← previous
next →
101–200 of 212, ranked by callers