I hereby claim:
- I am suyash on github.
- I am suyash93 (https://keybase.io/suyash93) on keybase.
- I have a public key ASB0FMVL09PSCDnomjVVQCJzpz-5L9fDYgQi3l49j4NthQo
To claim this, I am signing this object:
private fun sweepGradientShaderWithOffset( | |
vararg colorStops: Pair<Float, Color>, | |
offset: Float = 0f, | |
center: Offset = Offset.Unspecified | |
): Brush { | |
return object : ShaderBrush() { | |
override fun createShader(size: Size): Shader { | |
// https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Brush.kt;l=576-583;drc=a18f72ab3de68971fb30d894d41f4441aa09fd4f | |
val normalizedCenter = | |
if (center.isUnspecified) { |
//! Knuth-Morris-Pratt implementation | |
//! | |
//! See Chapter 17 in Blandy + Orendorff | |
/// computes the KMP longest prefix-suffix function | |
pub fn kmp<T: AsRef<[u8]>>(pattern: T) -> Vec<usize> { | |
let pattern = pattern.as_ref(); | |
let n = pattern.len(); | |
let mut ans = vec![0; n + 1]; |
//! Generic Segment Tree implemented for custom comparator and min functions. | |
//! | |
//! See Chapters 15, 16 in Blandy and Orendorff | |
/// Segment Tree allows for querying information over ranges in a continuous data stream. | |
pub struct SegmentTree<T, Comparator, Minimum> { | |
tree: Vec<T>, | |
n: usize, | |
f: Comparator, | |
d: Minimum, |
[package] | |
name = "min-char-rnn-rs" | |
version = "0.1.0" | |
authors = ["Suyash <suyash93@protonmail.com>"] | |
edition = "2018" | |
[dependencies] | |
rulinalg = "0.4.2" | |
rand = "0.6.4" | |
indicatif = "0.11.0" |
I hereby claim:
To claim this, I am signing this object: