Adapt symmetric_kernel for non-WASM targets

The examples call `engine::realize_gram`, which now includes a call to
`symmetric_kernel`, so we need to make sure that `symmetric_kernel`
can run on whatever target Cargo uses for examples. For that target on
my machine, `console::log_1` panics with the message "function not
implemented on non-`wasm32` targets".
This commit is contained in:
Aaron Fenyes 2024-12-11 12:59:57 -08:00
parent c87367a276
commit 90834fbb93

View File

@ -111,9 +111,14 @@ impl ConfigSubspace {
)
)
);
/* DEBUG */
// print the eigenvalues
#[cfg(all(target_family = "wasm", target_os = "unknown"))]
console::log_1(&JsValue::from(
format!("Hessian eigenvalues: {}", eig.eigenvalues)
)); /* DEBUG */
format!("Eigenvalues used to find kernel: {}", eig.eigenvalues)
));
ConfigSubspace(basis.collect())
}