1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Enhanced visualization utilities for dendrograms
//!
//! This module provides comprehensive tools for visualizing hierarchical clustering results,
//! organized into focused submodules for better maintainability and clarity.
//!
//! # Modules
//!
//! - [`types`] - Core data structures and configuration types
//! - [`plotting`] - Dendrogram creation and positioning logic
//! - [`colors`] - Color palette generation and management
//! - [`export`] - Export functionality for various formats (SVG, HTML, JSON)
//!
//! # Quick Start
//!
//! ```rust
//! use scirs2_cluster::hierarchy::visualization::{
//! create_dendrogramplot, DendrogramConfig, ColorScheme
//! };
//! use scirs2_core::ndarray::Array2;
//!
//! // Create a linkage matrix (from hierarchical clustering)
//! let linkage = Array2::from_shape_vec((3, 4), vec![
//! 0.0, 1.0, 0.1, 2.0,
//! 2.0, 3.0, 0.2, 2.0,
//! 4.0, 5.0, 0.3, 4.0,
//! ]).expect("operation should succeed");
//!
//! // Configure the visualization
//! let mut config = DendrogramConfig::default();
//! config.color_scheme = ColorScheme::Viridis;
//! config.show_labels = true;
//!
//! // Create the plot
//! let plot = create_dendrogramplot(
//! linkage.view(),
//! Some(&["A".to_string(), "B".to_string(), "C".to_string(), "D".to_string()]),
//! config
//! ).expect("operation should succeed");
//!
//! // Export to various formats
//! let svg = plot.to_svg().expect("operation should succeed");
//! let html = plot.to_html().expect("operation should succeed");
//! let json = plot.to_json().expect("operation should succeed");
//! ```
// Re-export modules
// Re-export core types and functions for convenience
pub use ;
pub use ;
pub use create_dendrogramplot;
pub use *;
// Additional convenience re-exports
pub use ;