MCPcopy Create free account

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

Functions212 in github.com/EbTech/rust-algorithms

Methodconjugate
(self)
src/math/num.rs:121
Methodcounting_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
Methoddefault
Creates an empty trie with a root node.
src/string_proc.rs:12
Methoddefault
()
src/range_query/dynamic_arq.rs:23
Methoddiv
(self, other: Self)
src/math/num.rs:87
Methodeuler_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
Methodeuler_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
Methodextract
(f: Self::F)
src/math/fft.rs:70
Functionfactorize
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
Functionfft
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
Functionfirst_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
Methodfrom
(num: i64)
src/math/num.rs:45
Methodfrom_polar
(r: f64, th: f64)
src/math/num.rs:112
Methodfrom_small
Avoids the % operation but requires -M <= x < M
src/math/num.rs:203
Methodget_factor
(n: usize, inverse: bool)
src/math/fft.rs:66
Methodget_roots
(n: usize, inverse: bool)
src/math/fft.rs:59
Methodidentity
()
src/range_query/specs.rs:52
Methodindex
(&self, row: usize)
src/math/num.rs:302
Methodindex_mut
(&mut self, row: usize)
src/math/num.rs:308
Methodlongest_common_prefix
Computes the length of longest common prefix of text[i..] and text[j..].
src/string_proc.rs:271
Functionmain
()
tests/codeforces343d.rs:99
Functionmerge_sort
A stable sort
src/order.rs:49
Methodmin_cut
After running maximum flow, use this to recover the dual minimum cut.
src/graph/flow.rs:112
Methodmul
(self, other: Self)
src/math/num.rs:80
Methodneg
(self)
src/math/num.rs:51
Methodnew
(reader: R)
src/scanner.rs:13
Methodnew
Builds an index, given the full set of coordinates to compress.
src/order.rs:65
Methodnew
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
Methodnew
Construct a new RNG from a 64-bit seed.
src/rng.rs:23
Methodnew
Creates a new tree, built to handle queries on the interval [left, right).
src/li_chao.rs:21
Methodnew
Constuctor for the Casher # Examples ``` # use contest_algorithms::caching::Cacher; let mut squared = Cacher::new(|n: u32| n*n); ```
src/caching.rs:37
Methodnew
(num_v: usize)
src/graph/connectivity.rs:15
Methodnew
Initializes disjoint sets containing one element each.
src/graph/mod.rs:18
Methodnew
Initializes an flow network with vmax vertices and no edges.
src/graph/flow.rs:19
Methodnew
(n: usize)
src/math/fft.rs:11
Methodnew
(num: i64, den: i64)
src/math/num.rs:23
Methodnew
(vals: Vec<usize>)
src/range_query/sqrt_decomp.rs:73
Methodnew
Initializes a static balanced binary tree on top of the given sequence.
src/range_query/static_arq.rs:27
Methodnew
Initializes the data structure without creating any nodes.
src/range_query/dynamic_arq.rs:55
Methodnext
(trie: &Trie<C>, fail: &[usize], mut node: usize, ch: &C)
src/string_proc.rs:130
Methodnext_u32
(&mut self)
src/rng.rs:39
Methodone
(cols: usize)
src/math/num.rs:260
Methodop
(&a: &Self::S, &b: &Self::S)
src/range_query/specs.rs:49
Methodquery
Returns the aggregate range query on all entries from l to r, inclusive.
src/range_query/dynamic_arq.rs:154
Functionreference
()
src/rng.rs:84
Functionslice_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
Methodsub
(self, other: Self)
src/math/num.rs:71
Functiontest_ac_matching
()
src/string_proc.rs:390
Functiontest_adj_list
()
src/graph/mod.rs:132
Functiontest_basic_flow
()
src/graph/flow.rs:204
Functiontest_biconnected
()
src/graph/connectivity.rs:230
Functiontest_binary_search_rmq
()
src/range_query/mod.rs:121
Functiontest_bounds
()
src/order.rs:155
Functiontest_cacher_basically_works
()
src/caching.rs:80
Functiontest_cacher_speed
()
src/caching.rs:106
Functiontest_call_and_replace
()
src/caching.rs:120
Functiontest_compile_stdio
()
src/scanner.rs:119
Functiontest_complex
()
src/math/num.rs:404
Functiontest_complex_convolution
()
src/math/fft.rs:216
Functiontest_complex_dft
()
src/math/fft.rs:181
Functiontest_convex_hull_trick
()
src/order.rs:213
Functiontest_coord_compress
()
src/order.rs:191
Functiontest_dfs
()
src/graph/util.rs:148
Functiontest_dfs2
()
src/graph/util.rs:166
Functiontest_dfs_space_complexity
()
src/graph/util.rs:184
Functiontest_dijkstra
()
src/graph/util.rs:136
Functiontest_dynamic_binary_search_rmq
()
src/range_query/mod.rs:134
Functiontest_dynamic_range_sum
()
src/range_query/mod.rs:84
Functiontest_dynamic_rmq
()
src/range_query/mod.rs:28
Functiontest_dynamic_supply_demand
()
src/range_query/mod.rs:109
Functiontest_egcd
()
src/math/mod.rs:132
Functiontest_euler
()
src/graph/util.rs:111
Functiontest_field
()
src/math/num.rs:420
Functiontest_huge_rmq
()
src/range_query/mod.rs:58
Functiontest_in_memory_io
()
src/scanner.rs:99
Functiontest_in_memory_unsafe
()
src/scanner.rs:109
Functiontest_kmp_matching
()
src/string_proc.rs:380
Functiontest_li_chao_tree
()
src/li_chao.rs:88
Functiontest_linalg
()
src/math/num.rs:443
Functiontest_max_matching
()
src/graph/flow.rs:227
Functiontest_merge_sort
()
src/order.rs:182
Functiontest_merge_sorted
()
src/order.rs:171
Functiontest_miller
()
src/math/mod.rs:153
Functiontest_min_cost_flow
()
src/graph/flow.rs:214
Functiontest_min_spanning_tree
()
src/graph/util.rs:122
Functiontest_modexp
()
src/math/mod.rs:144
Functiontest_modular_convolution
()
src/math/fft.rs:227
Functiontest_modular_dft
()
src/math/fft.rs:196
Functiontest_mos_algorithm
()
src/range_query/sqrt_decomp.rs:109
Functiontest_palindrome
()
src/string_proc.rs:428
Functiontest_panic_file
()
src/scanner.rs:130
Functiontest_persistent_rmq
()
src/range_query/mod.rs:42
Functiontest_pollard
()
src/math/mod.rs:166
Functiontest_range_compress
()
src/order.rs:204
Functiontest_range_sum
()
src/range_query/mod.rs:71
Functiontest_rational
()
src/math/num.rs:382
Functiontest_rmq
()
src/range_query/mod.rs:15
Functiontest_suffix_array
()
src/string_proc.rs:405
Functiontest_supply_demand
()
src/range_query/mod.rs:98
Functiontest_toposort
()
src/graph/connectivity.rs:198
← previousnext →101–200 of 212, ranked by callers