Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ cargo run --release --example profile_breakdown_torsions
| Feature | Examples |
|---|---|
| `burn` | `burn_sd_fm_semidiscrete_linear`, `burn_rfm_minibatch_ot_linear` |
| `riemannian` | `rfm_poincare_geodesic_ode`, `riemannian_fm_poincare` |
| `riemannian` | `rfm_poincare_geodesic_ode`, `riemannian_fm_poincare`, `rfm_fisher_simplex` |
| `sheaf-evals` | `rfm_usgs_earthquakes_cluster_mass`, `rfm_usgs_knn_leiden`, `rfm_usgs_full_pipeline_report` |

```sh
cargo run --release --features burn --example burn_sd_fm_semidiscrete_linear
cargo run --release --features burn --example burn_rfm_minibatch_ot_linear
cargo run --release --features riemannian --example rfm_poincare_geodesic_ode
cargo run --release --features riemannian --example riemannian_fm_poincare
cargo run --release --features riemannian --example rfm_fisher_simplex
cargo run --release --features sheaf-evals --example rfm_usgs_earthquakes_cluster_mass
cargo run --release --features sheaf-evals --example rfm_usgs_knn_leiden
cargo run --release --features sheaf-evals --example rfm_usgs_full_pipeline_report
Expand Down
4 changes: 2 additions & 2 deletions examples/fynch_bregman_energy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ fn main() {
let shannon_grad = bregman_energy_gradient(&fynch::Shannon, &x.view(), &center.view(), sigma)
.expect("Shannon gradient");

println!("x: {x:?}");
println!("center: {center:?}");
println!("x: {:?}", x.to_vec());
println!("center: {:?}", center.to_vec());
println!("squared-L2 energy via fynch: {l2_energy:.6}");
println!("squared-L2 energy via logp: {logp_l2_energy:.6}");
println!("Shannon energy via fynch: {shannon_energy:.6}");
Expand Down
5 changes: 3 additions & 2 deletions examples/ode_comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ fn main() {
}

println!();
println!("Observation: Euler's radius grows each step (energy gain),");
println!("while Heun's radius stays near 1.0 (symplectic-like behavior).");
println!("Observation: both methods gain radius on this flow. Per step the radius");
println!("grows by about h^2/2 for Euler and h^4/8 for Heun (h = step size), so");
println!("Heun's error falls much faster as the step count rises.");
}
Loading