From 031a0e1e238b997fafd073816d0b9aaa434ea381 Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Wed, 23 Oct 2019 19:01:37 -0700 Subject: [PATCH] lil tweaks --- Graph/DirectedMultiGraph.cs | 3 --- Graph/DirectedWeightedMultiGraph.cs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Graph/DirectedMultiGraph.cs b/Graph/DirectedMultiGraph.cs index ed22993..1890a83 100644 --- a/Graph/DirectedMultiGraph.cs +++ b/Graph/DirectedMultiGraph.cs @@ -1,6 +1,3 @@ -using System; -using System.Collections.Generic; - namespace MoonTools.Core.Graph { public class DirectedMultiGraph : MultiGraph where TNode : System.IEquatable diff --git a/Graph/DirectedWeightedMultiGraph.cs b/Graph/DirectedWeightedMultiGraph.cs index 1fbe524..06974fe 100644 --- a/Graph/DirectedWeightedMultiGraph.cs +++ b/Graph/DirectedWeightedMultiGraph.cs @@ -63,7 +63,7 @@ namespace MoonTools.Core.Graph gScore[start] = 0; fScore[start] = heuristic(start, end); - while (openSet.Any()) + while (openSet.Count > 0) { var currentNode = openSet.MinBy(node => fScore[node]).First();