summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--IEdge.cs11
-rw-r--r--IVertex.cs13
-rw-r--r--Interfaces.csproj (renamed from CS340.Interfaces.csproj)0
3 files changed, 24 insertions, 0 deletions
diff --git a/IEdge.cs b/IEdge.cs
new file mode 100644
index 0000000..4fb68da
--- /dev/null
+++ b/IEdge.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace Interfaces
+{
+ public interface IEdge<T> where T : IComparable<T>
+ {
+ int U { get; set; }
+ int V { get; set; }
+ T Weight { get; set; }
+ }
+}
diff --git a/IVertex.cs b/IVertex.cs
new file mode 100644
index 0000000..40165db
--- /dev/null
+++ b/IVertex.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+
+namespace Interfaces
+{
+ public interface IVertex<T, U> : INode<U>, IComparable<INode<U>>
+ where T : IEdge<U>, new()
+ where U : IComparable<U>
+ {
+ List<T> Edges { get; set; }
+ int Parent { get; set; }
+ }
+}
diff --git a/CS340.Interfaces.csproj b/Interfaces.csproj
index b76c640..b76c640 100644
--- a/CS340.Interfaces.csproj
+++ b/Interfaces.csproj