Crate aoclib_rs

Crate aoclib_rs 

Source

Modules§

binary_search
dijkstra
dir
iter
matrix
option_min_max
point
trie

Macros§

printwriteln

Functions§

abs
Get the absolute value for generic types.
fold_while
Essentially a short-circuiting version of Iterator::fold() (see https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.fold). The only difference between this and Iterator::fold() is that the closure in this function returns two values: the accumulator value and a boolean. If the boolean returned is true, fold_while() will continue iterating, otherwise it will terminate early.
gcd
Greatest common divisor. Behaviour when calling with negative numbers can be unintuitive; refer to examples below.
inc_selector
Increments a “selector” slice of booleans. Essentially treats the slice as a binary number and increments it. Returns true if the input is already all true and doesn’t increment. Returns false and increments otherwise.
pad
pad_vec
position_2d
Given 2-dimensional data and a predicate, position_2d() returns the position (ie, the 2D indices) of where the predicate first returned true, or None if the predicate never returns true. The input data is interpreted as follows:
prep_io
split_and_parse
split_by_char
u8_to_string
usize_plus_i
Adds generic type to usize. Can panic if the values are outside the range of the given types.