remove Core namespace

master
Evan Hemsley 2020-02-20 18:43:25 -08:00
parent 9aba0a82d8
commit 806096c17a
30 changed files with 63 additions and 63 deletions

View File

@ -26,7 +26,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: dotnet nuget push ./Graph/bin/Release/MoonTools.Core.Graph.*.nupkg -k $API_KEY -s https://api.nuget.org/v3/index.json
- run: dotnet nuget push ./Graph/bin/Release/MoonTools.Graph.*.nupkg -k $API_KEY -s https://api.nuget.org/v3/index.json
workflows:
version: 2

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Collections.Pooled;
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public class DirectedGraph<TNode, TEdgeData> : SimpleGraph<TNode, TEdgeData>, IUnweightedGraph<TNode, TEdgeData> where TNode : IEquatable<TNode>
{

View File

@ -1,4 +1,4 @@
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public class DirectedMultiGraph<TNode, TEdgeData> : MultiGraph<TNode, TEdgeData>, IUnweightedGraph<TNode, TEdgeData> where TNode : System.IEquatable<TNode>
{
@ -15,4 +15,4 @@ namespace MoonTools.Core.Graph
}
}
}
}
}

View File

@ -4,7 +4,7 @@ using System.Linq;
using Collections.Pooled;
using MoreLinq;
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public class DirectedWeightedGraph<TNode, TEdgeData> : SimpleGraph<TNode, TEdgeData>, IWeightedGraph<TNode, TEdgeData> where TNode : System.IEquatable<TNode>
{
@ -245,4 +245,4 @@ namespace MoonTools.Core.Graph
return ShortestPath(start, end, BellmanFordSingleSourceShortestPath);
}
}
}
}

View File

@ -4,7 +4,7 @@ using System.Linq;
using Collections.Pooled;
using MoreLinq;
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public class DirectedWeightedMultiGraph<TNode, TEdgeData> : MultiGraph<TNode, TEdgeData>, IWeightedMultiGraph<TNode, TEdgeData> where TNode : IEquatable<TNode>
{
@ -266,4 +266,4 @@ namespace MoonTools.Core.Graph
return ShortestPath(start, end, BellmanFordSingleSourceShortestPath);
}
}
}
}

View File

@ -1,4 +1,4 @@
namespace MoonTools.Core.Graph.Extensions
namespace MoonTools.Graph.Extensions
{
public static class UnweightedExtensions
{
@ -15,4 +15,4 @@ namespace MoonTools.Core.Graph.Extensions
}
}
}
}
}

View File

@ -1,4 +1,4 @@
namespace MoonTools.Core.Graph.Extensions
namespace MoonTools.Graph.Extensions
{
public static class WeightedExtensions
{
@ -15,4 +15,4 @@ namespace MoonTools.Core.Graph.Extensions
}
}
}
}
}

View File

@ -1,4 +1,4 @@
namespace MoonTools.Core.Graph.Extensions
namespace MoonTools.Graph.Extensions
{
public static class WeightedMultiExtensions
{
@ -15,4 +15,4 @@ namespace MoonTools.Core.Graph.Extensions
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using Collections.Pooled;
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
abstract public class Graph<TNode, TEdgeData> where TNode : System.IEquatable<TNode>
{
@ -63,4 +63,4 @@ namespace MoonTools.Core.Graph
neighbors.Clear();
}
}
}
}

View File

@ -1,4 +1,4 @@
namespace MoonTools.Core.Graph.Extensions
namespace MoonTools.Graph.Extensions
{
public static class GraphBuilder
{
@ -32,4 +32,4 @@ namespace MoonTools.Core.Graph.Extensions
return new UndirectedWeightedGraph<TNode, Unit>();
}
}
}
}

View File

@ -1,7 +1,7 @@
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public interface IUnweightedGraph<TNode, TEdgeData>
{
void AddEdge(TNode v, TNode u, TEdgeData edgeData);
}
}
}

View File

@ -1,7 +1,7 @@
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public interface IWeightedGraph<TNode, TEdgeData>
{
void AddEdge(TNode v, TNode u, int weight, TEdgeData edgeData);
}
}
}

View File

@ -1,7 +1,7 @@
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public interface IWeightedMultiGraph<TNode, TEdgeData>
{
System.Guid AddEdge(TNode v, TNode u, int weight, TEdgeData edgeData);
}
}
}

View File

@ -2,20 +2,20 @@
<PropertyGroup>
<Version>1.0.0</Version>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>A GC-friendly graph theory library for .NET Core intended for use with games.</Description>
<PackageId>MoonTools.Core.Graph</PackageId>
<RootNamespace>MoonTools.Core.Graph</RootNamespace>
<Description>A GC-friendly graph theory library for .NET Standard intended for use with games.</Description>
<PackageId>MoonTools.Graph</PackageId>
<RootNamespace>MoonTools.Graph</RootNamespace>
<Company>Moonside Games</Company>
<Authors>Evan Hemsley</Authors>
<Copyright>Evan Hemsley 2019</Copyright>
<Product>MoonTools.Core.Graph</Product>
<Copyright>Evan Hemsley 2020</Copyright>
<Product>MoonTools.Graph</Product>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyName>MoonTools.Core.Graph</AssemblyName>
<AssemblyName>MoonTools.Graph</AssemblyName>
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/MoonsideGames/MoonTools.Core.Graph</PackageProjectUrl>
<PackageProjectUrl>https://gitea.moonside.games/MoonsideGames/MoonTools.Graph</PackageProjectUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="morelinq" Version="3.2.0"/>
<PackageReference Include="Collections.Pooled" Version="1.0.82"/>
</ItemGroup>
</Project>
</Project>

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
abstract public class MultiGraph<TNode, TEdgeData> : Graph<TNode, TEdgeData> where TNode : System.IEquatable<TNode>
{
@ -69,4 +69,4 @@ namespace MoonTools.Core.Graph
return edgeToEdgeData[id];
}
}
}
}

View File

@ -1,7 +1,7 @@
using System;
using System.Runtime.Serialization;
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
[Serializable]
public class NegativeCycleException : Exception
@ -22,4 +22,4 @@ namespace MoonTools.Core.Graph
{
}
}
}
}

View File

@ -1,7 +1,7 @@
using System;
using System.Runtime.Serialization;
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
[Serializable]
public class NegativeWeightException : Exception
@ -22,4 +22,4 @@ namespace MoonTools.Core.Graph
{
}
}
}
}

View File

@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
abstract public class SimpleGraph<TNode, TEdgeData> : Graph<TNode, TEdgeData> where TNode : System.IEquatable<TNode>
{
@ -49,4 +49,4 @@ namespace MoonTools.Core.Graph
edgeToEdgeData.Clear();
}
}
}
}

View File

@ -2,7 +2,7 @@ using System.Linq;
using System.Collections.Generic;
using Collections.Pooled;
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public class UndirectedGraph<TNode, TEdgeData> : DirectedGraph<TNode, TEdgeData>, IUnweightedGraph<TNode, TEdgeData> where TNode : System.IEquatable<TNode>
{
@ -103,4 +103,4 @@ namespace MoonTools.Core.Graph
return nodeList.All(node => nodeList.All(other => Neighbors(node).Contains(other) || node.Equals(other)));
}
}
}
}

View File

@ -1,4 +1,4 @@
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public class UndirectedWeightedGraph<TNode, TEdgeData> : DirectedWeightedGraph<TNode, TEdgeData>, IWeightedGraph<TNode, TEdgeData> where TNode : System.IEquatable<TNode>
{
@ -16,4 +16,4 @@ namespace MoonTools.Core.Graph
}
}
}
}
}

View File

@ -1,4 +1,4 @@
namespace MoonTools.Core.Graph
namespace MoonTools.Graph
{
public struct Unit { }
}

View File

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonTools.Core.Graph", "Graph\MoonTools.Core.Graph.csproj", "{424ACD00-5613-4DBF-8D79-6509D7841D8A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonTools.Graph", "Graph\MoonTools.Graph.csproj", "{424ACD00-5613-4DBF-8D79-6509D7841D8A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{423B5FFF-5B19-4D1C-ACF7-B5908E3E50EA}"
EndProject

View File

@ -1,7 +1,7 @@
# MoonTools.Core.Graph
# MoonTools.Graph
[![NuGet Badge](https://buildstats.info/nuget/MoonTools.Core.Graph)](https://www.nuget.org/packages/MoonTools.Core.Graph/)
[![CircleCI](https://circleci.com/gh/MoonsideGames/MoonTools.Core.Graph.svg?style=svg)](https://circleci.com/gh/MoonsideGames/MoonTools.Core.Graph)
[![NuGet Badge](https://buildstats.info/nuget/MoonTools.Graph)](https://www.nuget.org/packages/MoonTools.Graph/)
[![CircleCI](https://circleci.com/gh/MoonsideGames/MoonTools.Graph.svg?style=svg)](https://circleci.com/gh/MoonsideGames/MoonTools.Graph)
A GC-friendly graph theory library for C# intended for use with games.
@ -25,4 +25,4 @@ A GC-friendly graph theory library for C# intended for use with games.
* change Edge id from a Guid to an integer index on the edge
* Prim Minimum Spanning Tree
* Kruskal Minimum Spanning Tree
* Undirected Weighted Multigraph
* Undirected Weighted Multigraph

View File

@ -4,7 +4,7 @@ using FluentAssertions;
using System;
using System.Linq;
using MoonTools.Core.Graph;
using MoonTools.Graph;
namespace Tests
{

View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using FluentAssertions;
using MoonTools.Core.Graph;
using MoonTools.Graph;
using System;
using System.Linq;
@ -533,4 +533,4 @@ namespace Tests
.BeEmpty();
}
}
}
}

View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using FluentAssertions;
using MoonTools.Core.Graph;
using MoonTools.Graph;
using System.Linq;
namespace Tests
@ -489,4 +489,4 @@ namespace Tests
myGraph.Invoking(x => x.BellmanFordShortestPath('a', 'z').Count()).Should().Throw<System.ArgumentException>();
}
}
}
}

View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using FluentAssertions;
using MoonTools.Core.Graph.Extensions;
using MoonTools.Graph.Extensions;
namespace Tests
{
@ -123,4 +123,4 @@ namespace Tests
undirectedWeightedGraph.Weight(4, 1).Should().Be(2);
}
}
}
}

View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using FluentAssertions;
using MoonTools.Core.Graph;
using MoonTools.Graph;
namespace Tests
{
@ -131,4 +131,4 @@ namespace Tests
graph.Bipartite.Should().BeFalse();
}
}
}
}

View File

@ -1,7 +1,7 @@
using NUnit.Framework;
using FluentAssertions;
using MoonTools.Core.Graph;
using MoonTools.Graph;
using System;
using System.Linq;
@ -354,4 +354,4 @@ namespace Tests
.BeEmpty();
}
}
}
}

View File

@ -10,6 +10,6 @@
<PackageReference Include="FluentAssertions" Version="5.9.0"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Graph\MoonTools.Core.Graph.csproj" />
<ProjectReference Include="..\Graph\MoonTools.Graph.csproj" />
</ItemGroup>
</Project>
</Project>