///|
/// A self-contained offline report. JavaScript only displays precomputed results:
/// slider filtering, table selection and coordinate projections; no homology runs in UI.
/// JSON escapes '<' so public cell keys cannot terminate the data script.
pub fn html_report(
analysis : Analysis,
source~ : Json = Json::null(),
) -> String {
let report = report_json(analysis, source~)
let data = report.stringify().replace_all(old="<", new="\\u003c")
let header =
#|
#|
#|MoonTopoLens · 月拓镜分析报告
#|
#|
#|分步教学
跟随当前数据观察连接分量与环路,完成五步引导和计数测验。
当前尺度是否存在至少一个 H1 环路
#|
#|
#|
#|
#|
#|Betti 曲线
蓝色 H0 / 橙色 H1 / 紫色 H2(如已分析);按全部出生和死亡事件绘制精确阶梯曲线。
#|代表环路用于解释计算结果,不保证最短。三维视图使用前三个坐标,高维数据仍保留全部坐标参与计算;投影交叉不代表原空间相交。距离矩阵没有几何坐标时仍可查看全部拓扑结果。
#|选择 H1 区间可查看出生时的代表环路;必要时自动切换到出生尺度。
#|代表链对应的原始数据
| 分析顶点 | 原始数据编号(从 0 开始) | 原始数值 / 延迟窗口 |
|---|
#|
#|
#|
#|
accessible_report(
(header + data + script)
.replace_all(old="", new="" + scope_html(report))
.replace_all(
old="