Skip to main content

Crate sim_lib_view_math

Crate sim_lib_view_math 

Source
Expand description

Math, plotting, tensor, and symbolic lenses for the SIM Web-UI (WEBUI_4).

This lens family makes graphical math first-class: scene/plot series and function plots, scene/matrix editable tensor/matrix slices, a symbolic-expression tree lens, and slider/knob-driven parameter sweeps (intent/set-param) with snapshot and compare. Numbers are read from the existing sim-lib-numbers-* domains for display; the runtime value stays the authoritative number.

§Example

A numeric series opens in a plot lens as a Scene value:

let scene = sim_lib_view_math::plot_view("y = x", &[(0.0, 0.0), (1.0, 1.0)]);
assert!(sim_lib_scene::validate_scene(&scene).is_ok());

Re-exports§

pub use matrix::MATRIX_LENS;
pub use matrix::cell;
pub use matrix::matrix;
pub use matrix::matrix_view;
pub use matrix::set_cell;
pub use num::as_f64;
pub use num::number;
pub use num::point;
pub use plot::PLOT_LENS;
pub use plot::multi_plot_view;
pub use plot::plot_view;
pub use plot::series;
pub use sweep::Sweep;
pub use symbolic::SYMBOLIC_LENS;
pub use symbolic::call;
pub use symbolic::symbolic_tree;

Modules§

matrix
Tensor/matrix lens: an editable scene/matrix.
num
Numeric helpers shared by the math lenses.
plot
Plotting lenses: 2D series and function plots as scene/plot.
sweep
Parameter sweeps: slider/knob-driven plots with snapshot and compare.
symbolic
Symbolic-expression tree lens.

Statics§

RECIPES
Embedded cookbook recipe books shipped with this library.