Conversation
- Implements `NetworkPropagationTool` using the `EpidemiologyTool` trait. - Uses math backend `heterogeneous_r0` to calculate reproduction number. - Exposes UI sliders for parameters (beta, gamma, mean_degree, variance). - Uses `egui::Painter` to render a fixed circular network graph. - Updates `todo_gui.md` marking the feature as completed. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Pull request overview
Adds a new “Network Propagation” sub-tool to the Epidemiology tab in math_explorer_gui, using math_explorer::epidemiology::networks::heterogeneous_r0 to compute an R0 value and egui::Painter to draw a simple network visualization.
Changes:
- Introduces
NetworkPropagationToolUI with sliders for β, γ, mean degree, and degree variance, plus an R0 readout and basic network rendering. - Registers the new tool in the Epidemiology tab’s tool list.
- Marks the “Network Propagation” roadmap item as completed.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| todo_gui.md | Marks Network Propagation feature as implemented in the roadmap. |
| math_explorer_gui/src/tabs/epidemiology/network.rs | New tool implementation: parameters, R0 calculation, and painter-based visualization. |
| math_explorer_gui/src/tabs/epidemiology/mod.rs | Adds the network module and includes the new tool in the selector list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .add(egui::Slider::new(&mut self.mean_degree, 0.1..=10.0).text("Mean Degree <k>")) | ||
| .changed(); | ||
| changed |= ui | ||
| .add(egui::Slider::new(&mut self.degree_variance, 0.0..=10.0).text("Degree Variance Var(k)")) | ||
| .changed(); |
| num_nodes: usize, | ||
| positions: Vec<[f32; 2]>, | ||
| edges: Vec<(usize, usize)>, | ||
| } |
This commit adds the Network Propagation tool to the Epidemiology tab in the math_explorer_gui. It calculates the R0 value for heterogeneous networks and uses
egui::Painterto visually render an abstraction of a disease spreading through a node network.PR created automatically by Jules for task 14582420259585349310 started by @fderuiter