From 786047044def789fe3e38a0a7b1ac5948e730e10 Mon Sep 17 00:00:00 2001 From: Robert Huang Date: Mon, 14 Jan 2019 14:46:58 +0800 Subject: [PATCH 1/4] Adjust IAlgorithmObserverFactory design --- src/Heuristic.Linq.Test/ObserverTest.cs | 11 +++++++---- src/Heuristic.Linq/HeuristicSearch.cs | 10 +++++----- src/Heuristic.Linq/HeuristicSearchBase.cs | 2 +- src/Heuristic.Linq/IAlgorithmObserverFactory.cs | 5 +++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/Heuristic.Linq.Test/ObserverTest.cs b/src/Heuristic.Linq.Test/ObserverTest.cs index a561204..fe9d92b 100644 --- a/src/Heuristic.Linq.Test/ObserverTest.cs +++ b/src/Heuristic.Linq.Test/ObserverTest.cs @@ -7,6 +7,7 @@ namespace Heuristic.Linq.Test { using Algorithms; + using System.Diagnostics; public class ObserverTest { @@ -22,9 +23,11 @@ public class ObserverTest [InlineData(nameof(RecursiveBestFirstSearch))] public void TestIProgressOnlyCreatedOnce(string algorithmName) { - var factory = new Mock(); + var factory = new Mock>(); + var progress = new Progress>(); - factory.Setup(f => f.Create(It.IsAny>())).Returns(() => new Progress>()); + progress.ProgressChanged += (o, e) => Debug.WriteLine("{0}\t{1} ({2})", e.Node.Step, e.Node.Level, nameof(progress.ProgressChanged)); + factory.Setup(f => f.Create(It.IsAny>())).Returns(() => progress); var queryable = HeuristicSearch.Use(algorithmName, start, goal, (step, lv) => step.GetFourDirections(unit), null, factory.Object); var obstacles = new[] { new Point(5, 5), new Point(6, 6), new Point(7, 7), new Point(8, 8), new Point(9, 9) }; @@ -44,7 +47,7 @@ orderby step.GetManhattanDistance(goal) [InlineData(nameof(RecursiveBestFirstSearch))] public void TestLastFlagFound(string algorithmName) { - var factory = new Mock(); + var factory = new Mock>(); var progress = new Mock>>(); var actual = default(AlgorithmFlag?); var expected = (AlgorithmFlag?)AlgorithmFlag.Found; @@ -73,7 +76,7 @@ orderby step.GetManhattanDistance(goal) [InlineData(nameof(RecursiveBestFirstSearch))] public void TestLastFlagNotFound(string algorithmName) { - var factory = new Mock(); + var factory = new Mock>(); var progress = new Mock>>(); var actual = default(AlgorithmFlag?); var expected = (AlgorithmFlag?)AlgorithmFlag.NotFound; diff --git a/src/Heuristic.Linq/HeuristicSearch.cs b/src/Heuristic.Linq/HeuristicSearch.cs index ba89920..8479eae 100755 --- a/src/Heuristic.Linq/HeuristicSearch.cs +++ b/src/Heuristic.Linq/HeuristicSearch.cs @@ -87,7 +87,7 @@ public static HeuristicSearchBase AStar(TStep from, TStep t /// The object that is able to create instances. /// The instance that is ready to be applied with LINQ expressions. /// is null. - public static HeuristicSearchBase AStar(TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) + public static HeuristicSearchBase AStar(TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) { return new HeuristicSearchInitial(nameof(AStar), from, to, comparer, expander) { AlgorithmObserverFactory = observerFactory }; } @@ -132,7 +132,7 @@ public static HeuristicSearchBase BestFirstSearch(TStep fro /// The object that is able to create instances. /// The instance that is ready to be applied with LINQ expressions. /// is null. - public static HeuristicSearchBase BestFirstSearch(TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) + public static HeuristicSearchBase BestFirstSearch(TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) { return new HeuristicSearchInitial(nameof(BestFirstSearch), from, to, comparer, expander) { AlgorithmObserverFactory = observerFactory }; } @@ -177,7 +177,7 @@ public static HeuristicSearchBase RecursiveBestFirstSearch( /// The object that is able to create instances. /// The instance that is ready to be applied with LINQ expressions. /// is null. - public static HeuristicSearchBase RecursiveBestFirstSearch(TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) + public static HeuristicSearchBase RecursiveBestFirstSearch(TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) { return new HeuristicSearchInitial(nameof(RecursiveBestFirstSearch), from, to, comparer, expander) { AlgorithmObserverFactory = observerFactory }; } @@ -222,7 +222,7 @@ public static HeuristicSearchBase IterativeDeepeningAStar(T /// The object that is able to create instances. /// The instance that is ready to be applied with LINQ expressions. /// is null. - public static HeuristicSearchBase IterativeDeepeningAStar(TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) + public static HeuristicSearchBase IterativeDeepeningAStar(TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) { return new HeuristicSearchInitial(nameof(IterativeDeepeningAStar), from, to, comparer, expander) { AlgorithmObserverFactory = observerFactory }; } @@ -320,7 +320,7 @@ public static HeuristicSearchBase Use(string algorithmName, /// The instance that is ready to be applied with LINQ expressions. /// or is null. /// cannot be found. - public static HeuristicSearchBase Use(string algorithmName, TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) + public static HeuristicSearchBase Use(string algorithmName, TStep from, TStep to, Func> expander, IEqualityComparer comparer, IAlgorithmObserverFactory observerFactory) { try { diff --git a/src/Heuristic.Linq/HeuristicSearchBase.cs b/src/Heuristic.Linq/HeuristicSearchBase.cs index 1d79554..1050763 100755 --- a/src/Heuristic.Linq/HeuristicSearchBase.cs +++ b/src/Heuristic.Linq/HeuristicSearchBase.cs @@ -53,7 +53,7 @@ public abstract class HeuristicSearchBase : IEnumerable /// public INodeComparer NodeComparer => _nc; - internal IAlgorithmObserverFactory AlgorithmObserverFactory { get; set; } + internal IAlgorithmObserverFactory AlgorithmObserverFactory { get; set; } internal bool IsReversed { get; set; } // Consider exposing this. diff --git a/src/Heuristic.Linq/IAlgorithmObserverFactory.cs b/src/Heuristic.Linq/IAlgorithmObserverFactory.cs index 3d34710..625de8b 100644 --- a/src/Heuristic.Linq/IAlgorithmObserverFactory.cs +++ b/src/Heuristic.Linq/IAlgorithmObserverFactory.cs @@ -7,13 +7,14 @@ namespace Heuristic.Linq /// /// Represents the object that is able to create instances. /// - public interface IAlgorithmObserverFactory + /// The type of step of the problem. + public interface IAlgorithmObserverFactory { /// /// Creates an instance where T is . /// /// The instance that allows LINQ expressions to be applied to. /// An instance. - IProgress> Create(HeuristicSearchBase source); + IProgress> Create(HeuristicSearchBase source); } } \ No newline at end of file From 4e3defa0de33639703e538085c1a4a6fb130fa38 Mon Sep 17 00:00:00 2001 From: Robert Huang Date: Mon, 14 Jan 2019 14:48:02 +0800 Subject: [PATCH 2/4] Move examples to new solution --- .travis.yml | 2 + .../Heuristic.Linq.Example.EightPuzzle.csproj | 2 +- .../Heuristic.Linq.Example.PathFinding.csproj | 2 +- src/Heuristic.Linq.Example.sln | 64 +++++++++++++++++++ .../Heuristic.Linq.Example.csproj | 2 +- src/Heuristic.Linq.sln | 42 ------------ 6 files changed, 69 insertions(+), 45 deletions(-) create mode 100644 src/Heuristic.Linq.Example.sln diff --git a/.travis.yml b/.travis.yml index e326b08..600dba3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,9 @@ dotnet: 2.2 install: - dotnet restore src/Heuristic.Linq.sln +- dotnet restore src/Heuristic.Linq.Example.sln script: - dotnet build src/Heuristic.Linq.sln +- dotnet build src/Heuristic.Linq.Example.sln - dotnet test src/Heuristic.Linq.Test/Heuristic.Linq.Test.csproj -c Release \ No newline at end of file diff --git a/src/Heuristic.Linq.Example.EightPuzzle/Heuristic.Linq.Example.EightPuzzle.csproj b/src/Heuristic.Linq.Example.EightPuzzle/Heuristic.Linq.Example.EightPuzzle.csproj index a472254..ab07fef 100644 --- a/src/Heuristic.Linq.Example.EightPuzzle/Heuristic.Linq.Example.EightPuzzle.csproj +++ b/src/Heuristic.Linq.Example.EightPuzzle/Heuristic.Linq.Example.EightPuzzle.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/Heuristic.Linq.Example.PathFinding/Heuristic.Linq.Example.PathFinding.csproj b/src/Heuristic.Linq.Example.PathFinding/Heuristic.Linq.Example.PathFinding.csproj index 27fb54b..5499d15 100644 --- a/src/Heuristic.Linq.Example.PathFinding/Heuristic.Linq.Example.PathFinding.csproj +++ b/src/Heuristic.Linq.Example.PathFinding/Heuristic.Linq.Example.PathFinding.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/Heuristic.Linq.Example.sln b/src/Heuristic.Linq.Example.sln new file mode 100644 index 0000000..7b52acf --- /dev/null +++ b/src/Heuristic.Linq.Example.sln @@ -0,0 +1,64 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2015 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heuristic.Linq.Example", "Heuristic.Linq.Example\Heuristic.Linq.Example.csproj", "{2A7970EB-AFC3-476E-83B4-EB2175AA26ED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heuristic.Linq.Example.PathFinding", "Heuristic.Linq.Example.PathFinding\Heuristic.Linq.Example.PathFinding.csproj", "{4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heuristic.Linq.Example.EightPuzzle", "Heuristic.Linq.Example.EightPuzzle\Heuristic.Linq.Example.EightPuzzle.csproj", "{16307EF6-A7BB-4E54-8496-9F39CAE78D90}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|x64.ActiveCfg = Debug|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|x64.Build.0 = Debug|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|x86.ActiveCfg = Debug|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|x86.Build.0 = Debug|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|Any CPU.Build.0 = Release|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|x64.ActiveCfg = Release|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|x64.Build.0 = Release|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|x86.ActiveCfg = Release|Any CPU + {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|x86.Build.0 = Release|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|x64.ActiveCfg = Debug|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|x64.Build.0 = Debug|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|x86.ActiveCfg = Debug|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|x86.Build.0 = Debug|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|Any CPU.Build.0 = Release|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|x64.ActiveCfg = Release|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|x64.Build.0 = Release|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|x86.ActiveCfg = Release|Any CPU + {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|x86.Build.0 = Release|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|x64.ActiveCfg = Debug|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|x64.Build.0 = Debug|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|x86.ActiveCfg = Debug|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|x86.Build.0 = Debug|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|Any CPU.Build.0 = Release|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|x64.ActiveCfg = Release|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|x64.Build.0 = Release|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|x86.ActiveCfg = Release|Any CPU + {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C5E73D1C-3461-42FF-817B-0EF9965EFCAE} + EndGlobalSection +EndGlobal diff --git a/src/Heuristic.Linq.Example/Heuristic.Linq.Example.csproj b/src/Heuristic.Linq.Example/Heuristic.Linq.Example.csproj index ab08502..1670924 100755 --- a/src/Heuristic.Linq.Example/Heuristic.Linq.Example.csproj +++ b/src/Heuristic.Linq.Example/Heuristic.Linq.Example.csproj @@ -6,6 +6,6 @@ - + diff --git a/src/Heuristic.Linq.sln b/src/Heuristic.Linq.sln index 8bcc4f6..324783f 100755 --- a/src/Heuristic.Linq.sln +++ b/src/Heuristic.Linq.sln @@ -4,14 +4,8 @@ VisualStudioVersion = 15.0.27428.2015 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heuristic.Linq", "Heuristic.Linq\Heuristic.Linq.csproj", "{3CBF214D-8F76-4EA2-8B52-F517C4C44D5E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heuristic.Linq.Example", "Heuristic.Linq.Example\Heuristic.Linq.Example.csproj", "{2A7970EB-AFC3-476E-83B4-EB2175AA26ED}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heuristic.Linq.Test", "Heuristic.Linq.Test\Heuristic.Linq.Test.csproj", "{E13EDB71-C5DB-40B0-A097-94ACB803347B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heuristic.Linq.Example.PathFinding", "Heuristic.Linq.Example.PathFinding\Heuristic.Linq.Example.PathFinding.csproj", "{4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Heuristic.Linq.Example.EightPuzzle", "Heuristic.Linq.Example.EightPuzzle\Heuristic.Linq.Example.EightPuzzle.csproj", "{16307EF6-A7BB-4E54-8496-9F39CAE78D90}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -34,18 +28,6 @@ Global {3CBF214D-8F76-4EA2-8B52-F517C4C44D5E}.Release|x64.Build.0 = Release|Any CPU {3CBF214D-8F76-4EA2-8B52-F517C4C44D5E}.Release|x86.ActiveCfg = Release|Any CPU {3CBF214D-8F76-4EA2-8B52-F517C4C44D5E}.Release|x86.Build.0 = Release|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|x64.ActiveCfg = Debug|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|x64.Build.0 = Debug|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|x86.ActiveCfg = Debug|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Debug|x86.Build.0 = Debug|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|Any CPU.Build.0 = Release|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|x64.ActiveCfg = Release|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|x64.Build.0 = Release|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|x86.ActiveCfg = Release|Any CPU - {2A7970EB-AFC3-476E-83B4-EB2175AA26ED}.Release|x86.Build.0 = Release|Any CPU {E13EDB71-C5DB-40B0-A097-94ACB803347B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E13EDB71-C5DB-40B0-A097-94ACB803347B}.Debug|Any CPU.Build.0 = Debug|Any CPU {E13EDB71-C5DB-40B0-A097-94ACB803347B}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -58,30 +40,6 @@ Global {E13EDB71-C5DB-40B0-A097-94ACB803347B}.Release|x64.Build.0 = Release|Any CPU {E13EDB71-C5DB-40B0-A097-94ACB803347B}.Release|x86.ActiveCfg = Release|Any CPU {E13EDB71-C5DB-40B0-A097-94ACB803347B}.Release|x86.Build.0 = Release|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|x64.ActiveCfg = Debug|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|x64.Build.0 = Debug|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|x86.ActiveCfg = Debug|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Debug|x86.Build.0 = Debug|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|Any CPU.Build.0 = Release|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|x64.ActiveCfg = Release|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|x64.Build.0 = Release|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|x86.ActiveCfg = Release|Any CPU - {4A5F4997-8FCC-4DE0-8954-DC69F7AC499E}.Release|x86.Build.0 = Release|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|Any CPU.Build.0 = Debug|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|x64.ActiveCfg = Debug|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|x64.Build.0 = Debug|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|x86.ActiveCfg = Debug|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Debug|x86.Build.0 = Debug|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|Any CPU.ActiveCfg = Release|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|Any CPU.Build.0 = Release|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|x64.ActiveCfg = Release|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|x64.Build.0 = Release|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|x86.ActiveCfg = Release|Any CPU - {16307EF6-A7BB-4E54-8496-9F39CAE78D90}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From e13900208dad4804033b3171411c97f969bed509 Mon Sep 17 00:00:00 2001 From: Robert Huang Date: Mon, 14 Jan 2019 15:03:16 +0800 Subject: [PATCH 3/4] Update package information --- src/Heuristic.Linq/Heuristic.Linq.csproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Heuristic.Linq/Heuristic.Linq.csproj b/src/Heuristic.Linq/Heuristic.Linq.csproj index 0d28008..84b0d6c 100755 --- a/src/Heuristic.Linq/Heuristic.Linq.csproj +++ b/src/Heuristic.Linq/Heuristic.Linq.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -8,17 +8,17 @@ Robert Vandenberg Huang Linq To A* https://raw.githubusercontent.com/rvhuang/linq-to-astar/master/LICENSE - 1.2.0-beta + 1.2.0-beta2 linq-to-astar linq;astar;heuristic © 2019 Robert Vandenberg Huang - LINQ to A* is a POC aimed to incorporate LINQ into A* as well as other heuristic search algorithms. With the library, LINQ can now be used as query expression to state conditions and fetch shortest path found by the algorithm. + LINQ to A* is a POC aimed to bring LINQ to A* and other heuristic search algorithms. The library enables LINQ to be used as the query expression to the algorithm. https://raw.githubusercontent.com/rvhuang/linq-to-astar/master/favicon.ico true false - 1. New interface IAlgorithmObserverFactory and a set of APIs have been added to support algorithm observation. -2. All built-in algorithms now can be observed. -3. Fix incorrect documentation comments. + 1. The interface IAlgorithmObserverFactory has been redesigned for easier use. +2. All APIs that accept IAlgorithmObserverFactory arguments have been changed. +3. Fix grammatical errors in documentation comments. From 127d302795c9260270f403ad969ff9d59a90257b Mon Sep 17 00:00:00 2001 From: Robert Huang Date: Mon, 14 Jan 2019 15:56:39 +0800 Subject: [PATCH 4/4] Reorganize namespaces --- src/Heuristic.Linq.Test/ObserverTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Heuristic.Linq.Test/ObserverTest.cs b/src/Heuristic.Linq.Test/ObserverTest.cs index fe9d92b..f209f44 100644 --- a/src/Heuristic.Linq.Test/ObserverTest.cs +++ b/src/Heuristic.Linq.Test/ObserverTest.cs @@ -1,5 +1,6 @@ using Moq; using System; +using System.Diagnostics; using System.Drawing; using System.Linq; using Xunit; @@ -7,7 +8,6 @@ namespace Heuristic.Linq.Test { using Algorithms; - using System.Diagnostics; public class ObserverTest {