from os import listdir
DNAME = "out"
-PNAMES = {
- "test22": "3D tree, RS-RS",
- "test23": "3D tree, RS-H",
- "test24": "3D grid, RS-RS",
- "test25": "3D grid, RS-H",
- "test26": "2D tree, RS-E",
- "test27": "2D grid, RS-E",
-}
def sort_dict(f):
"""Sort dict returned by ``f``."""
dones = [1 for c in v if c < 9999 and c > -1]
e[k] = 100 * (len(v) - len(dones)) / len(v)
e2 = {}
+ i = 1
for k, v in e.items():
- e2[PNAMES[k]] = v
+ e2[i] = v
+ i += 1
return [e2]
def time():
"""Return the dictionary of ``fname``'s and corresponding times."""
r = grep("time")
r2 = {}
+ i = 1
for k, v in r.items():
- r2[PNAMES[k]] = v
+ r2[i] = v
+ i += 1
return r2
def cost():
"""Return the dictionary of ``fname``'s and corresponding costs."""
r = grep("cost")
r2 = {}
+ i = 1
for k, v in r.items():
- r2[PNAMES[k]] = v
+ r2[i] = v
+ i += 1
return r2
def cusp():
"""Return the dictionary of ``fname``'s and corresponding cusps."""
r = grep("cusps-in-path")
r2 = {}
+ i = 1
for k, v in r.items():
- r2[PNAMES[k]] = v
+ r2[i] = v
+ i += 1
return r2
def iter():
"""Return the dictionary of ``fname``'s and number of iterations."""
r = grep("iterations")
r2 = {}
+ i = 1
for k, v in r.items():
- r2[PNAMES[k]] = v
+ r2[i] = v
+ i += 1
return r2