finish all analysis

This commit is contained in:
2026-04-20 00:36:28 +09:00
parent 009bf59ff0
commit 31219c4618
26 changed files with 1130 additions and 483 deletions
+4 -10
View File
@@ -18,7 +18,6 @@ def run_test(
trials,
mean_dist,
start,
end,
base_seed
):
timer = time.perf_counter
@@ -55,7 +54,7 @@ def run_test(
bin_heap = BinHeap(nodes)
st = timer()
dist, stats = heap_dijkstra(nodes, adj, bin_heap, start, end)
stats = heap_dijkstra(nodes, adj, bin_heap, start)
et = timer()
rows.append(
{
@@ -67,7 +66,6 @@ def run_test(
"seed": seed,
"time": et - st,
"algorithm": "binary",
"reached": dist != INF,
"extract_min_calls": stats.extract_min_calls,
"relax_attempts": stats.relax_attempts,
"relax_success": stats.relax_success,
@@ -76,7 +74,7 @@ def run_test(
fibo_heap = FiboHeap(nodes)
st = timer()
dist, stats = heap_dijkstra(nodes, adj, fibo_heap, start, end)
stats = heap_dijkstra(nodes, adj, fibo_heap, start)
et = timer()
rows.append(
{
@@ -88,7 +86,6 @@ def run_test(
"seed": seed,
"time": et - st,
"algorithm": "fibonacci",
"reached": dist != INF,
"extract_min_calls": stats.extract_min_calls,
"relax_attempts": stats.relax_attempts,
"relax_success": stats.relax_success,
@@ -110,12 +107,11 @@ def run_test(
# Settings
nodes_li = [2000, 4000, 8000, 16000]
densities = [0.00015, 0.0003, 0.0006, 0.0012, 0.0024, 0.0048, 0.0096, 0.0192, 0.0384]
densities = [0.0000001, 0.0000003, 0.000001, 0.000003, 0.00001, 0.00003, 0.0001, 0.0003, 0.001, 0.003, 0.01, 0.03, 0.1, 0.3]
stds = [1000, 1500, 2000, 3000, 4000, 6000, 8000, 12000, 16000]
trials = 400
trials = 10
mean_dist = 3000
start = 0
end = 1
base_seed = 42
save_folder = "results/synthetic_data/raw"
@@ -131,7 +127,6 @@ config = {
"trials": trials,
"mean_dist": mean_dist,
"start": start,
"end": end,
"base_seed": base_seed,
}
with open(config_file, "w") as f:
@@ -144,6 +139,5 @@ df = run_test(
trials = trials,
mean_dist = mean_dist,
start = start,
end = end,
base_seed = base_seed
)