bumped kernel_density to 0.0.3

This commit is contained in:
Quinn Dougherty 2022-08-18 00:26:09 -07:00
parent a5932f998a
commit 20797d4886
4 changed files with 14 additions and 34 deletions

View File

@ -11,13 +11,10 @@ rec {
buildPhase = '' buildPhase = ''
cargo build --lib --release --target=wasm32-unknown-unknown cargo build --lib --release --target=wasm32-unknown-unknown
mkdir -p $out/pkg mkdir -p $out/pkg
wasm-bindgen --target nodejs --out-dir $out/pkg target/wasm32-unknown-unknown/release/quri_squiggle_mc.wasm wasm-bindgen --target nodejs --out-dir $out/pkg target/wasm32-unknown-unknown/release/quri_squiggle_mc.wasm
''; '';
installPhase = "echo 'skipping installPhase'"; installPhase = "echo 'skipping installPhase'";
cargoLock = { cargoLock = {
lockFile = ../packages/mc/Cargo.lock; lockFile = ../packages/mc/Cargo.lock;
outputHashes = { outputHashes = {
@ -29,7 +26,7 @@ rec {
name = "squiggle-mc-lint"; name = "squiggle-mc-lint";
src = ../packages/mc; src = ../packages/mc;
buildInputs = with pkgs; [ rustfmt ]; buildInputs = with pkgs; [ rustfmt ];
buildPhase = "rustfmt --check src"; buildPhase = "rustfmt --check src/**";
installPhase = "mkdir -p $out"; installPhase = "mkdir -p $out";
}; };

23
packages/mc/Cargo.lock generated
View File

@ -286,11 +286,10 @@ dependencies = [
[[package]] [[package]]
name = "kernel_density" name = "kernel_density"
version = "0.0.2" version = "0.0.3"
source = "git+https://github.com/daithiocrualaoich/kernel_density#98c5fb6f9989d9bb6db19adc134cdbd32512d41e" source = "git+https://github.com/quinn-dougherty/kernel_density#c044758c96ae0c4666523a38449f3dbd0d4695cd"
dependencies = [ dependencies = [
"rand 0.3.23", "rand 0.4.6",
"special-fun",
] ]
[[package]] [[package]]
@ -441,16 +440,6 @@ dependencies = [
"wee_alloc", "wee_alloc",
] ]
[[package]]
name = "rand"
version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c"
dependencies = [
"libc",
"rand 0.4.6",
]
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.4.6" version = "0.4.6"
@ -589,12 +578,6 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "special-fun"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cde43d93062bf8040a0d30f83a8b40b2756af55ba048e007ee7c81e02276b81"
[[package]] [[package]]
name = "statistics" name = "statistics"
version = "0.4.1" version = "0.4.1"

View File

@ -52,7 +52,7 @@ rand = "0.8.5"
getrandom = { version = "0.2.7", features = ["js"] } getrandom = { version = "0.2.7", features = ["js"] }
# rand_distr = "0.4.3" # rand_distr = "0.4.3"
statistics = "0.4.1" statistics = "0.4.1"
kernel_density = { git = "https://github.com/daithiocrualaoich/kernel_density" } kernel_density = { git = "https://github.com/quinn-dougherty/kernel_density", version = "0.0.3" }
cached = { version = "0.38.0", features = ["wasm"] } cached = { version = "0.38.0", features = ["wasm"] }
# instant = { git = "https://github.com/sebcrozet/instant", features = ["wasm-bindgen"] } # instant = { git = "https://github.com/sebcrozet/instant", features = ["wasm-bindgen"] }
# The `console_error_panic_hook` crate provides better debugging of panics by # The `console_error_panic_hook` crate provides better debugging of panics by

View File

@ -20,12 +20,12 @@ pub fn sample_n(samples: Box<[f32]>, num_samples: i32) -> Vec<f32> {
monte_carlo::sample_n(samples_vec, num_samples) monte_carlo::sample_n(samples_vec, num_samples)
} }
// #[wasm_bindgen] #[wasm_bindgen]
// pub fn samples_to_continuous_pdf(samples: Box<[f64]>, bandwidth: f64) -> JsValue { pub fn samples_to_continuous_pdf(samples: Box<[f64]>, bandwidth: f64) -> JsValue {
// #[cfg(debug_assertions)] #[cfg(debug_assertions)]
// console_error_panic_hook::set_once(); console_error_panic_hook::set_once();
//
// let samples_vec = Vec::from(samples); let samples_vec = Vec::from(samples);
// let pdf = monte_carlo::samples_to_continuous_pdf(samples_vec, bandwidth); let pdf = monte_carlo::samples_to_continuous_pdf(samples_vec, bandwidth);
// serde_wasm_bindgen::to_value(&pdf).unwrap() serde_wasm_bindgen::to_value(&pdf).unwrap()
//} }