shortest path
This commit is contained in:
parent
edd931bca5
commit
7d33d11a03
@ -67,14 +67,12 @@ public class Server
|
||||
{
|
||||
DateTime start = DateTime.Now;
|
||||
HashSet<string> allFiles = Directory.GetFiles(directory).Where(file => file.EndsWith(".result")).ToHashSet();
|
||||
PathResult first = PathResult.PathresultFromFile(allFiles.First());
|
||||
KeyValuePair<PathResult, string> shortest = new(first, allFiles.First());
|
||||
KeyValuePair<PathResult, string> fastest = new(first, allFiles.First());
|
||||
KeyValuePair<PathResult, string> calcTime = new(first, allFiles.First());
|
||||
Dictionary<PathResult, string> results = new();
|
||||
int loaded = 0;
|
||||
foreach (string filePath in allFiles)
|
||||
{
|
||||
PathResult result = PathResult.PathresultFromFile(filePath);
|
||||
results.Add(result, filePath);
|
||||
Console.WriteLine($"{loaded++}/{allFiles.Count()} {filePath} " +
|
||||
$"Time elapsed: {DateTime.Now - start} " +
|
||||
$"Remaining {((DateTime.Now - start)/loaded)*(allFiles.Count-loaded)}");
|
||||
|
Loading…
Reference in New Issue
Block a user