pub struct InteractiveVisualizer {
pub plot_configs: HashMap<String, PlotConfig>,
pub update_callbacks: Vec<Box<dyn Fn(&str, &Array2<Float>) + Send + Sync>>,
pub real_time_updates: bool,
}Expand description
Interactive visualization framework
Fields§
§plot_configs: HashMap<String, PlotConfig>Current plot configurations
update_callbacks: Vec<Box<dyn Fn(&str, &Array2<Float>) + Send + Sync>>Update callbacks
real_time_updates: boolReal-time update enabled
Implementations§
Source§impl InteractiveVisualizer
impl InteractiveVisualizer
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new interactive visualizer
§Examples
use sklears_inspection::visualization::InteractiveVisualizer;
let visualizer = InteractiveVisualizer::new();
assert!(!visualizer.real_time_updates);Sourcepub fn enable_real_time_updates(&mut self)
pub fn enable_real_time_updates(&mut self)
Enable real-time updates
Sourcepub fn disable_real_time_updates(&mut self)
pub fn disable_real_time_updates(&mut self)
Disable real-time updates
Sourcepub fn is_real_time_enabled(&self) -> bool
pub fn is_real_time_enabled(&self) -> bool
Check if real-time updates are enabled
Sourcepub fn add_update_callback<F>(&mut self, callback: F)
pub fn add_update_callback<F>(&mut self, callback: F)
Add an update callback
Sourcepub fn clear_callbacks(&mut self)
pub fn clear_callbacks(&mut self)
Clear all update callbacks
Sourcepub fn callback_count(&self) -> usize
pub fn callback_count(&self) -> usize
Get number of registered callbacks
Sourcepub fn update_plot_data(&self, plot_id: &str, data: &Array2<Float>)
pub fn update_plot_data(&self, plot_id: &str, data: &Array2<Float>)
Update plot data
Sourcepub fn set_plot_config(&mut self, plot_id: String, config: PlotConfig)
pub fn set_plot_config(&mut self, plot_id: String, config: PlotConfig)
Add or update a plot configuration
Sourcepub fn get_plot_config(&self, plot_id: &str) -> Option<&PlotConfig>
pub fn get_plot_config(&self, plot_id: &str) -> Option<&PlotConfig>
Get plot configuration by ID
Sourcepub fn remove_plot(&mut self, plot_id: &str) -> Option<PlotConfig>
pub fn remove_plot(&mut self, plot_id: &str) -> Option<PlotConfig>
Remove a plot configuration
Sourcepub fn plot_count(&self) -> usize
pub fn plot_count(&self) -> usize
Get number of configured plots
Sourcepub fn clear_plots(&mut self)
pub fn clear_plots(&mut self)
Clear all plot configurations
Trait Implementations§
Source§impl Debug for InteractiveVisualizer
impl Debug for InteractiveVisualizer
Auto Trait Implementations§
impl !RefUnwindSafe for InteractiveVisualizer
impl !UnwindSafe for InteractiveVisualizer
impl Freeze for InteractiveVisualizer
impl Send for InteractiveVisualizer
impl Sync for InteractiveVisualizer
impl Unpin for InteractiveVisualizer
impl UnsafeUnpin for InteractiveVisualizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more