diff --git a/scripts/hn_spectral_database.py b/scripts/hn_spectral_database.py index 9be9bd64..ccc01a25 100644 --- a/scripts/hn_spectral_database.py +++ b/scripts/hn_spectral_database.py @@ -357,13 +357,14 @@ def write_eval(results): "|-------|---|---|-------|------|---------|--------|------------|------|---------|-----|", ] for g in results["graphs"]: - ww = g['welch_wynn'] + ww = g.get('welch_wynn') ww_str = f"{ww:.4f}" if ww is not None else "N/A" + hb = g.get('hoffman_bound') + hb_str = f"{hb:.4f}" if hb is not None else "inf" lines.append( f"| {g['description']} | {g['n_vertices']} | {g['n_edges']} | " f"{g['lambda_max']:.4f} | {g['lambda_min']:.4f} | " - f"{g['hoffman_bound']:.4f} if g['hoffman_bound'] is not None else 'inf' | " - f"{g['chi_hoffman']} | {ww_str} | " + f"{hb_str} | {g['chi_hoffman']} | {ww_str} | " f"{g['chi_welch_wynn']} | {g['chi_known']} | {g['gap']} |" )